git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
http://www.php.net/manual/en/function.timezone-identifiers-list.php | |
<?php | |
$zones = timezone_identifiers_list(); | |
foreach ($zones as $zone) | |
{ | |
$zoneExploded = explode('/', $zone); // 0 => Continent, 1 => City | |
// Only use "friendly" continent names |
var simplifyPath = function( points, tolerance ) { | |
// helper classes | |
var Vector = function( x, y ) { | |
this.x = x; | |
this.y = y; | |
}; | |
var Line = function( p1, p2 ) { | |
this.p1 = p1; |
RewriteCond %{HTTP:X-Requested-With} !=XMLHttpRequest | |
RewriteCond %{HTTP:X-REQUESTED-WITH} !^(XMLHttpRequest)$ |
# -------------------------------------------- | |
# This code is for Twitter Bootstrap 2! | |
# -------------------------------------------- | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2012-2015 Dennis Riehle | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
/** | |
* jQuery.deparam - The oposite of jQuery param. Creates an object of query string parameters. | |
* | |
* Credits for the idea and Regex: | |
* http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/ | |
*/ | |
(function($){ | |
$.deparam = $.deparam || function(uri){ | |
if(uri === undefined){ | |
uri = window.location.search; |
// UMD dance - https://github.com/umdjs/umd | |
!function(root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['jquery'], factory); | |
} else { | |
factory(root.jQuery); | |
} | |
}(this, function($) { | |
'use strict'; |
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
<?php | |
/** | |
* Generate an encryption key for CodeIgniter. | |
* http://codeigniter.com/user_guide/libraries/encryption.html | |
*/ | |
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP | |
function generate_token ($len = 32) | |
{ |