Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
$zip = new ZipArchive; | |
$bkfile = '../export/backup/backup-source-' . date('dd-mm-yy') . '.zip'; | |
$zip->open($bkfile, ZipArchive::CREATE); | |
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("../../")); | |
// iterate over the directory | |
// add each file found to the archive | |
foreach ($iterator as $key => $value) { | |
if (in_array(substr($key, strrpos($key, '/') + 1), array('.', '..'))) |
function loadScript(url, callback) { | |
var script = document.createElement('script'); | |
var entry = document.getElementsByTagName('script')[0]; | |
var readyHandler; | |
script.async = true; | |
script.src = url; | |
entry.parentNode.insertBefore(script, entry); | |
if (script.addEventListener) { | |
script.addEventListener('load', callback, false); |
define(function() { | |
'use strict'; | |
// Basic sessionStorage shim | |
var storage; | |
if (Modernizr.sessionstorage) { | |
storage = sessionStorage; | |
} else { | |
storage = { | |
items: {}, |
function deparam(str) { | |
var o = {}; | |
var reg = /\\?([^?=&]+)(=([^&#]*))?/g; | |
str.replace(reg, function($0, $1, $2, $3) { | |
if (typeof $3 == 'string') { | |
o[$1] = decodeURIComponent($3); | |
} | |
}); |
!function(global) { | |
'use strict'; | |
var defaults = { | |
'default': 'yeah', | |
'test': 'simon' | |
}; | |
// Wrapper function that allows us to pass it to define later | |
var wrap = function($) { |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
set :user, 'myusername' | |
set :password, 'mypasss' | |
set :site, "212.227.98.37" | |
set :webpath, "mydomain.com" | |
set :domain, "#{site}" | |
set :application, "#{webpath}" | |
set :scm, :subversion | |
set :scm_username, "longnguyen" |
set :application, "mydomain.vn" | |
# the path to your new deployment directory on the server | |
set :deploy_to, "/home/longnguyen/www" | |
# the git-clone url for your repository | |
set :repository, "git@bitbucket.org:gialachoanglong/repo.git" | |
# the branch you want to clone (default is master) | |
set :branch, "master" |
String.prototype.replace_all = function(target, replacement) { | |
return this.split(target).join(replacement); | |
}; |
<?php | |
/** | |
* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want | |
* To Public License, Version 2, as published by Sam Hocevar. See | |
* http://sam.zoy.org/wtfpl/COPYING for more details. | |
*/ | |
/** |