This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Aside from removing Ruby on Rails specific code this is taken verbatim from | |
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome | |
# - Ryan Florence (http://ryanflorence.com) | |
# | |
# Install this hook to a remote repository with a working tree, when you push | |
# to it, this hook will reset the head so the files are updated | |
if ENV['GIT_DIR'] == '.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/gin-gonic/gin" | |
_ "github.com/lib/pq" | |
"github.com/gorilla/context" | |
"github.com/jinzhu/gorm" | |
"github.com/spf13/viper" | |
"time" | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Paste your token between the quotes : | |
var authToken = '________________________________________' | |
// https://github.com/yanatan16/nanoajax | |
!function(t,e){function n(t){return t&&e.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:e.XMLHttpRequest?new XMLHttpRequest:void 0}function o(t,e,n){t[e]=t[e]||n}var r=["responseType","withCredentials","timeout","onprogress"];t.ajax=function(t,a){function s(t,e){return function(){c||(a(void 0===f.status?t:f.status,0===f.status?"Error":f.response||f.responseText||e,f),c=!0)}}var u=t.headers||{},i=t.body,d=t.method||(i?"POST":"GET"),c=!1,f=n(t.cors);f.open(d,t.url,!0);var l=f.onload=s(200);f.onreadystatechange=function(){4===f.readyState&&l()},f.onerror=s(null,"Error"),f.ontimeout=s(null,"Timeout"),f.onabort=s(null,"Abort"),i&&(o(u,"X-Requested-With","XMLHttpRequest"),e.FormData&&i instanceof e.FormData||o(u,"Content-Type","application/x-www-form-urlencoded"));for(var p,m=0,v=r.length;v>m;m++)p=r[m],void 0!==t[p]&&(f[p]=t[p]);for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$compressed = array( | |
".0" => "Hacha Split Archive File", | |
".000" => "DoubleSpace Compressed File", | |
".7z" => "7-Zip Compressed File", | |
".7z.001" => "7-Zip Split Archive Part 1 File", | |
".7z.002" => "7-Zip Split Archive Part 2 File", | |
".a00" => "ALZip Second Split Archive File", | |
".a01" => "ALZip Third Split Archive File", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/local/bin/php | |
<?php | |
/* | |
1) replace the shebang (first line) with the path to your php binary | |
(probably something like /usr/bin/php) | |
2) move the file to /usr/local/bin/datauri.php | |
(this should be in your PATH) | |
3) chmod ugo+rx /usr/local/bin/datauri.php | |
(make the script executable for everyone) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Axl Hoogelander | |
* @copyright 2012 | |
* @description How 2 use the class | |
*/ | |
include 'uploader.php'; | |
if(isset($_POST['upload'])): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FileDownload | |
{ | |
public static $_response_status = array( | |
200 => 'OK', | |
201 => 'Created', | |
204 => 'No Content', | |
206 => 'Partial', | |
207 => 'Multi-Status', // WTF ?? |