What are we trying to observe? Raw object data.
// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
#/bin/sh | |
PULSEPHP_URL="https://github.com/diniremix/pulsePHP/archive/master.zip" | |
PULSEJS_URL="https://gist.githubusercontent.com/diniremix/8df589843792342197cd/raw/deebde566b25316fc39c8da5a18a4eeb9e88efa4/pulseJS.js" | |
TEST_DIR="./test" | |
APP_DIR="./js" | |
function help(){ | |
echo; | |
echo -e "\e[1;97mpulse\e[0m - a simple script to generate skeletons for Web applications"; |
function shit() { | |
if [ -n "$2" ]; then | |
curl -i http://git.io -F url=https://github.com/"$1" -F code="$2"; | |
else | |
curl -i http://git.io -F url=https://github.com/"$1"; | |
fi | |
} |
// console.lol by @RonnyOrbach, idea by Erez Avny | |
if (typeof console != 'undefined') console.lol = function(){ | |
var args = [].slice.call(arguments, 0); | |
args.unshift("LOL"); | |
args.push("LOLOLOL!") | |
console.log.apply(console, args); | |
}; |
What are we trying to observe? Raw object data.
// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
script(type="text/html", id="modal-service-selection") | |
.modal-service-selection.modal-centered.modal.stretch.hide.fade | |
.modal-header | |
a.button-close(data-dismiss='modal') | |
img(src="../img/icons/latest/icon-exit.png") | |
h3 You have selected | |
span.emphasize {{ service.name }} | |
p Please select the subcategory that fits your needs: | |
.modal-body | |
ul.l-horizontal.clearfix.reservation-entries |
# Bash Fidget Spinner | |
# Could also be included in a bashrc file | |
fidget() { | |
start_time="0.02"; | |
spin_efficiency="0.99"; | |
end_time="3"; | |
time="$start_time"; | |
printf "\e[92mPress any key to give another spin...\n\n"; |
import BooksPage from './pages/BooksPage.js'; | |
new Vue({ | |
el: '#app', | |
data: { | |
page: BooksPage | |
}, | |
methods: { | |
navigate(event) { | |
this.page = () => import(`./${event.target.pathname}`) | |
// Vue.js < 2.5.0 |
angular.module('testApp', []). | |
directive('lazyLoad', ['$window', '$q', function ($window, $q) { | |
function load_script() { | |
var s = document.createElement('script'); // use global document since Angular's $document is weak | |
s.src = 'https://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize'; | |
document.body.appendChild(s); | |
} | |
function lazyLoadApi(key) { | |
var deferred = $q.defer(); | |
$window.initialize = function () { |
from itertools import islice | |
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import db | |
from firebase_admin import firestore | |
def _split(data, size=500): | |
"""Splits a dictionary into a sequence of smaller dictionaries.""" |
# 1. download zip from https://launchpad.net/kazam | |
# 2. extract into target folder | |
# install prerequisites (works on Fedora 21 with Python 3) | |
sudo yum install python3-distutils-extra python3-dbus intltool | |
# run the included setup from within the unzipped folder | |
sudo python3 setup.py install | |
# Done! Can start with either `kazam` command or find Kazam in the menu |