Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| /** | |
| * Provides requestAnimationFrame in a cross browser way. | |
| * @author paulirish / http://paulirish.com/ | |
| */ | |
| if ( !window.requestAnimationFrame ) { | |
| window.requestAnimationFrame = ( function() { | |
| return window.webkitRequestAnimationFrame || |
| var isPortTaken = function(PORT, callback) { | |
| var net = require('net') | |
| var tester = net.createServer() | |
| tester.once('error', function (err) { | |
| if (err.code == 'EADDRINUSE') { | |
| callback(null, true) | |
| } else { | |
| callback(err) | |
| } | |
| }) |
| var LINE = require('./line.js'); | |
| var line = new LINE(); | |
| var email = 'your email'; | |
| var password = 'your password'; | |
| line.login(email, password, function(error, result) { | |
| if (error) { | |
| return; | |
| } |
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
| @echo off | |
| @rem ================== | |
| @rem Source: | |
| @rem https://gist.github.com/jcppkkk/8330314 | |
| @rem Description: | |
| @rem Install context menu to allow user opens file with Sublime Text as User or Admin, or Open Folder with Sublime Text. | |
| @rem Usage: | |
| @rem Download this .bat file to in Sublime Text's installation folder. | |
| @rem Execute this batch file. It will download elevate codes and setup context menu. | |
| @rem ================== |
| DROP PROCEDURE IF EXISTS pivot_user_preferences; | |
| DELIMITER $$ | |
| CREATE PROCEDURE pivot_user_preferences(IN user_id INT) | |
| BEGIN | |
| DECLARE done INT DEFAULT FALSE; | |
| DECLARE definition_label CHAR(255); | |
| DECLARE label_cursor CURSOR FOR SELECT DISTINCT label FROM example_db.user_preferences; | |
| DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; |
Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this | |
| earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be | |
| retired. | |
| ## THE BELOW METHOD IS THE NEWER FCM METHOD: | |
| Register your app in the FCM Console: https://console.firebase.google.com (add project) | |
| 1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings. | |
| 2. Click on the GEAR settings icon, and then on "Project Settings" | |
| 3. In the main screen, click on "Cloud Messaging" |
| Options +FollowSymLinks | |
| RewriteEngine On | |
| RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] | |
| RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] | |
| RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) | |
| RewriteRule ^(.*)$ index.php [F,L] | |
| //Source: http://wp.smashingmagazine.com/2010/07/01/10-useful-wordpress-security-tweaks/ |