This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Intercepting HTTP calls with AngularJS. | |
angular.module('MyApp', []) | |
.config(function ($provide, $httpProvider) { | |
// Intercept http calls. | |
$provide.factory('MyHttpInterceptor', function ($q) { | |
return { | |
// On request success | |
request: function (config) { | |
// console.log(config); // Contains the data about the request before it is sent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#freePlayerPlayBtn").on('click',function(){ | |
kemMediaPlayer.initMedia(src,$("#freePlayerPlayBtn"),$("#freePlayerVolumeBar"),$("#freePlayerSeekeBar"),$("#freePlayerTotalDurationDisplay"),$("#freePlayerPlayedDurationDisplay")); | |
}); | |
$("#fullPlayerPlayBtn").on('click',function(){ | |
kemMediaPlayer.initMedia(src,$("#fullPlayerVolumeBar"),$("#fullPlayerVolumeBar"),$("#fullPlayerSeekeBar"),$("#fullPlayerTotalDurationDisplay"),$("#fullPlayerPlayedDurationDisplay")); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tattoo_submit() { | |
if (isset($_POST["addtattoo"])) { | |
$title = "Tattoo : ". $_POST["tatooInput"]; | |
$my_post = array( | |
'post_title' => $title, | |
'post_status' => 'publish', | |
'post_author' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a random number between min (inclusive) and max (exclusive) | |
*/ | |
function getRandomArbitrary(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
/** | |
* Returns a random integer between min (inclusive) and max (inclusive) | |
* Using Math.round() will give you a non-uniform distribution! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AfterViewInit, Component, ViewChild} from '@angular/core'; | |
import {FetchJsonService} from './services/fetch-json.service'; | |
import {FormBuilderService} from './services/form-builder.service'; | |
import FieldType from './class/ui/form/field/field-type'; | |
import FormType from './class/ui/form/form-type'; | |
import 'brace/mode/html'; | |
import 'brace/mode/typescript'; | |
import { setTimeout } from 'timers'; | |
import './windowFixed.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {AfterViewInit, Component, ViewChild} from '@angular/core'; | |
import {FetchJsonService} from './services/fetch-json.service'; | |
import {FormBuilderService} from './services/form-builder.service'; | |
import FieldType from './class/ui/form/field/field-type'; | |
import FormType from './class/ui/form/form-type'; | |
import 'brace/mode/html'; | |
import 'brace/mode/typescript'; | |
import { setTimeout } from 'timers'; | |
import './windowFixed.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gnome-desktop-item-edit ~/Desktop/ --create-new #create new desktop shortcut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var android = { | |
uAString: function() { | |
return navigator.userAgent; | |
}, | |
// Android Mobile | |
isAndroidMobile: function() { | |
return android.uAString().indexOf('Android') > -1 && android.uAString().indexOf('Mozilla/5.0') > -1 && android.uAString().indexOf('AppleWebKit') > -1; | |
}, | |
// Android Browser (not Chrome) | |
regExAppleWebKit: function() { |