start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
// jSON URL which should be requested | |
$json_url = 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?access_token=YOUR_APP_ID|YOUR_APP_SECRET'; | |
// Initializing curl | |
$ch = curl_init( $json_url ); | |
// Configuring curl options | |
$options = array( |
/* | |
I created the following javascript to use bootstrapt's notifications through Javascript. | |
If you like it you may consider adding it to bootstrapt. Feel free to modify if necessary. | |
Be sure you define a div #notification-area, where the notifications are going to be displayed by default. | |
I use it with jQuery 1.7.1 but it should work with older versions. Is also use jquery.hotkeys.js ( https://github.com/jeresig/jquery.hotkeys ) for block messages hotkeys | |
*/ | |
(function( $ ){ | |
var pub = { |
/** | |
* Example of using an angular provider to build an api service. | |
* @author Jeremy Elbourn (@jelbourn) | |
*/ | |
/** Namespace for the application. */ | |
var app = {}; | |
/******************************************************************************/ |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
npm install -g jspm@beta
jspm init
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
Note: these instructions are for pre-Sierra MacOS. Sierra (10.12) and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow
If you are getting this in gdb on OSX while trying to run a program:
Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.
/Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist