Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
// Put your device token here (without spaces): | |
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
// Put your private key's passphrase here: | |
$passphrase = 'xxxxxxx'; | |
// Put your alert message here: | |
$message = 'A push notification has been sent!'; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
We will assume we have a package/project called https://github.com/foo/bar
Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:
git tag -a 1.0.0 -m 'First version.'
With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json
and specify the tagged release we wanted:
// Playground - noun: a place where people can play | |
import Foundation | |
/*let parsedJSON : [String:AnyObject] = [ | |
"id": 1, | |
"name": "Cool User", | |
"email": "u.cool@example.com" | |
] |
// FUNCTION-BASED ANIMATION SEQUENCES FOR WS2812 LED STRIPS | |
// Using FastLED library | |
// Author: Dave Morris: http://www.google.com/+DaveMorris128 | |
// Version 1.0 (2014-07-31) | |
// | |
// | |
// The following code includes "primitive animations" which are the base effect and | |
// "aggregate animations" which are combinations of one or more primitive animations | |
// Feel free to combine different primitives each loop for synergistic results but: | |
// -If using an aggregate animation make sure your primatives don't clear the buffer each frame (FastLED.clear()) |
// get nearest parent element matching selector | |
var closest = (function() { | |
var el = HTMLElement.prototype; | |
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector; | |
return function closest(el, selector) { | |
return matches.call(el, selector) ? el : closest(el.parentElement, selector); | |
}; | |
})(); |
ctrl+shift+i
in firefox)streamlink hls://URL_FROM_STEP_5 best -o video1080p.ts
import cv2 | |
import numpy as np | |
def deskew(im, max_skew=10): | |
height, width = im.shape | |
# Create a grayscale image and denoise it | |
im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |