I often have problems debugging Etherpad Lite in IE mostly due to IE having a hideous way of relentlessly holding onto files in cache.. well today I figured out to stop that problem and it’s super easy.. In Developer tools, Click Cache –> Always refresh from server
Category: developing
Ajax CSV upload to a Table with jQuery and PHP
So I had to write a new user importer for School Email and I was looking for a simple plugin in solution but didn’t find one so here is a simple way of uploading a csv file that is uploaded to a file and rendered to a table..
Projects used: CsvToTable & jQuery File Upload & Editable Grid *optional for live edits.
Grab those two projects, grab the below files and put them in a /js folder then put the .js files into your head..
Put the jQuery-File-Upload folder in your root, we will be uploading files to here.. You may want to add a layer of security in front of the upload function.
<head> <script src="/js/csvToTable.js"></script> <script src="/js/jquery.iframe-transport.js"></script> <script src="/js/jquery.fileupload.js"></script> </head>
At the bottom of your body add..
<div id="csvToTable"></div> <div id="fileupload"></div> <script> var loggedIn = 1; // you will want to modify this if you require auth $(function () { if(loggedIn == "1"){ $('#fileupload').fileupload({ dataType: 'json', acceptFileTypes: '/(csv)$/i', url: '/jQuery-File-Upload/php/index.php', done: function (e, data, Users) { $.each(data.result, function(index, file){ $('#csvToTable').html(""); $('#csvToTable').CSVToTable(file.url).bind("loadComplete",function() { console.log("Loaded data into table"); /* Call functions to manipulate data here */ });; }); } }); } }); </script>
Want to make your table editor like the rest of the cool kids? Check out this jQuery plugin
Is it possible to build Metro Desktop Tiles without Visual Studio?
It pains me that I’m asking this but I have spent the last 3 hours using my favorite search engine looking for an answer to this question and I’m literally licking the pink knotted balloon of the internet right now so please hear me out..
I hate developing on Microsoft platforms, it feels dirty. After watching the Windows 8 developer talks where they introduced Metro and had a bunch of students create their own tiles I figured how hard can it be?
I’m not willing to use Visual Studio. Microsoft said Metro supports CSS/HTML/JS so I want to build my tile in notepad++. I don’t mind creating my own manifests, that’s fine, but I want to keep it open. I just don’t see a way to do this without installing an “app(has to be a binary)” and then binding that app to the desktop and hoping that Windows finds the manifest for the tile and implements it.
Anyone had any luck? I’d love a little tutorial that just shows me how to get started.. Once I’m up and running I will be good to go!
Thanks 🙂
TLDR: I refuse to use Visual Studio so I want a way to create a desktop tile for Microsoft Windows Metro that doesn’t involve compiling anything.
Transfer videos from Youtube to Vimeo
Tomnomnom made a new set of scripts for automatically uploading from the Linux shell to Vimeo.
Use the scripts to create a super simple way of uploading videos you have downloaded from Youtube (see below) to write straight into Vimeo automatically..
Enjoy! 🙂
Lately Iv’e felt a bit paranoid giving Google even control of my digital domain so I wanted to move all my videos to Vimeo and to keep a local copy for me. Google makes it easy for you to individually download your video files but I wanted to bulk copy them from my youtube account to my local box and at the same time upload them to vimeo…
This very rough and buggy PHP that allows you to move all of YOUR videos from Youtube to Vimeo. You should not use this script to steal anyones content. You should not use it for malicious purposes. The script is completely legal if used appropriately, it does not violate any of Google’s or Vimeo TOS. If you do use this to upload your files to Vimeo you should delete your videos from youtube as to avoid duplicate content.
Prereq’s & installation
1. php5 & curl..
2. php.ini for Apache w/ a large memory setting. edit memory setting in /etc/php5/apache2/php.ini or whatever
3. ssh/shell access (im too lazy to write a web front end <– scrap that I wrote a web front end cause I’m super cool.)..
4. Your videos must have a 720p download available else this is just a waste of everyones times. Let’s make video on the web better ey?
5. You get a Vimeo API key. http://vimeo.com/api/applications/new — When registering you will need to set it as a Write application and set a Callback URL as FullURL/vimeo/authenticate.php —
You also want to request perms to upload via — This can take up to a few days. After registration is click click Upload Access – request, then copy your consumer key and secret to the below options
6. Visit a URL where you extracted the files.
How it works
1. Query your YouTube account, gets a list of all videos
2. For each video get the ID, metadata (name, description etc.) and store that in an array
3. Get the video file for this Video
4. Upload the video file and metadata to Vimeo via the API
5. Return to Step 2, it’s a funking loopsi.
Limitations, because there be many
1. Unicorn rainbows are limited to 127 per session.
2. You can’t exclude certain videos
3. You can only do 50 videos at a time. // run it again w/ a higher value in the start-index if you want to do more than 50.
4. First upload fails right now, just a bug..
5. Breaks upload on many characters, just requires some encoding
Run by visiting /youtube/index.php
Note: Vimeo has a daily limit on the upload API, I think it’s ~10 videos a day..
Installing Kolab on CentOS
yum install gcc obmtool cd /usr/local mkdir kolab-templates cd kolab-templates wget -r -l1 -nd --no-parent http://ftp.belnet.be/packages/kolab/server/release/kolab-server-2.3.1/sources/ # note that the above url will change with newer versions, visit kolab.org and get the latest version number. This command may take some time so go make a cup of tea. cp -afv ../kolab-templates /usr/local/kolab cd /usr/local/kolab sh install-kolab.sh 2>&1 | tee /root/kolab-install.log # note that the above may take some time /kolab/sbin/kolab_bootstrap -b