Skip to content

Instantly share code, notes, and snippets.

View demonkoryu's full-sized avatar
🤔
...

Tobias Eckardt demonkoryu

🤔
...
View GitHub Profile
@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@defunkt
defunkt / gist:284823
Created January 23, 2010 22:09
Why to not use hub with RubyGems
# No RubyGems
$ time hub version
git version 1.6.0
hub version 0.2.0
real 0m0.047s
user 0m0.015s
sys 0m0.028s
# With RubyGems
@scottwb
scottwb / hudson_nginx.conf
Created July 2, 2010 03:55
Nginx config for Hudson CI behind a reverse proxy with SSL.
# Nginx config for Hudson CI behind a virtual host with SSL.
# Replace hudson.example.com with your domain name.
# Upstream Hudson server, e.g.: on port 3001
upstream hudson {
server localhost:3001
}
# Redirect all HTTP requests to HTTPS.
server {
@paydro
paydro / git-rsync.sh
Created February 15, 2011 02:16
rsync changed files in a git repo to a remote server
git status -s | awk '{print $2}' | sed 's/\(.*\)/rsync -cav \1 user@remote.server.com:~\/\1/' | sh
@shinzui
shinzui / tmux.conf
Created March 12, 2011 01:08 — forked from bryanl/tmux.conf
tmux.conf
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
# /opt/local/share/doc/tmux/vim-keys.conf
#
# URLs to read:
#
@okuryu
okuryu / yui.coffee
Created March 15, 2011 15:06
YUI x CoffeeScript x Node.js Example
$ node yui.js
info: (yui): Modules missing: io, 1
info: (yui): Fetching loader: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (get): URL: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (get): Loaded: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/loader/loader-debug.js
info: (yui): Modules missing: oop,parallel,event-custom-base,nodejs-dom,event-base,dom,node-base,dom-style-ie,node-style,queue-promote,datatype-xml,io,io-nodejs, 13
info: (yui): Using Loader
info: (loader): attempting to load oop, /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/
info: (get): URL: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/oop/oop-min.js
info: (get): Loaded: /usr/local/lib/node/.npm/yui3-core/3.3.0/package/build/oop/oop-min.js
@colinmollenhour
colinmollenhour / makePhpstormMap.php
Last active October 6, 2023 13:26
Generate map of factory method arguments to resolved class names for Magento projects
<?php
/* This script generates a mapping of factory methods/parameters to the resulting class
* names in such a way that PhpStorm 6.0.1 can use for autocompletion and chaining.
*
* Example:
* cd [magento root]
* php ~/makePhpstormMap.php > .phpstorm.meta.php
*
*/
@kara-ryli
kara-ryli / implementation.js
Created July 8, 2011 20:01
Create a singleton class in YUI3. This class can only be instantiated one time. All later instantiations return references to the original.
YUI().use("singleton-class", function (Y) {
var instance1 = new Y.SingletonClass(),
instance2 = new Y.SingletonClass();
Y.log(instance1 === instance2); // true!
window.instance1 = instance1;
});
YUI().use("singleton-class", function (Y) {
@dustin
dustin / noderunner.js
Created September 8, 2011 23:58
A web pipe server.
// Run this somewhere with a command you want to pipe stuff through.
//
// On a machine that needs data processed, run this:
// curl --data-binary @/some/file http://server:port/ > output
var http = require('http');
var spawn = require('child_process').spawn;
// 0 == node, 1 == [this script]
var PORT = parseInt(process.argv[2]);
@juandopazo
juandopazo / gist:1305379
Created October 22, 2011 01:04
Loading AMD modules from YUI
(function (window) {
var lastModule;
// configFn for all patterns that match an AMD-like module
// For now, only modules starting with ./ or ../ are recognized as being AMD-like
// Support for regular expressions in the patterns configuration was requested in ticket #2531324
// In the future the goal is to filter everything that looks like a file
// Any other AMD module must be declared in the "modules" config like any other module
function defConfigFn(config) {