This file was generated automatically based on this two sources:
- /etc/nginx/mime.types
- http://www.garykessler.net/library/file_sigs.html
This is a JSON object by following structure:
[string ext] : {
signs: [sign]
This file was generated automatically based on this two sources:
This is a JSON object by following structure:
[string ext] : {
signs: [sign]
This gist was getting a lot of comments/questions, but since there are no notifications when someone replies to a gist, I've moved the setup instructions and a bunch of sample code to a dedicated Github repo.
<?php | |
/** | |
* @file | |
* Basic demonstration of how to do parallel threads in PHP. | |
*/ | |
// This array of "tasks" could be anything. For demonstration purposes | |
// these are just strings, but they could be a callback, class or | |
// include file (hell, even code-as-a-string to pass to eval()). |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
image: node:argon | |
before_script: | |
- apt-get -qq update | |
- apt-get -qq install -y python2.7 python2.7-dev build-essential make gcc g++ libicu-dev | |
- npm -g install npm --silent | |
- "echo -e \"export default {CLIENT_ID: '$CLIENT_ID'}\" > app/scripts/settings.js" | |
- npm set progress=false | |
- npm install --silent |
Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.
For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.
This gives an ongoing list of file-type magic numbers.
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
<?php | |
class ResumeDownload { | |
private $file; | |
private $name; | |
private $boundary; | |
private $delay = 0; | |
private $size = 0; | |
function __construct($file, $delay = 0) { | |
if (! is_file($file)) { |
function perceptron0 = perceptron(numPoints, runs) | |
iters = 0; | |
for i = 1:runs | |
errors = 2; | |
points = genPoints(numPoints); | |
gWeights = [0 0 0]; | |
[fWeights,a,b] = genTarget; | |
while errors > 0 | |
errors = 0; |
[ | |
{ | |
"homepage": "http://digitaljhelms.github.com", | |
"name": "digitaljhelms", | |
"description": "finally blogging...", | |
"author": "Jeremy Helms", | |
"post": { | |
"url": "http://digitaljhelms.github.com/howto/creating-a-branch-with-no-parents-or-history", | |
"slug": "creating-a-branch-with-no-parents-or-history", | |
"title": "Create a Git Branch without Parents or History", |