Skip to content

Instantly share code, notes, and snippets.

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

Tobias Eckardt demonkoryu

🤔
...
View GitHub Profile
@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 {
@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
@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]);
@jasonbaik
jasonbaik / gist:2327644
Created April 7, 2012 11:11 — forked from behrendtio/gist:2260890
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@juandopazo
juandopazo / foo.js
Created October 8, 2012 15:03
Loading modules with relative paths
YUI.add('foo', function (Y) {
Y.foo = 'foo';
});
@AmyStephen
AmyStephen / PSR-0 and Composer.md
Last active December 12, 2015 10:09
Documentation of how the environment and how utilizing Composer parameters and the package repository structure, itself, impact the installation path and provide options for how best to implement the PSR-0 for your package.

PSR-0 and Composer

It's helpful to understand how Composer works and how to best utilize the environment as you implement your PSR-0 Namespace. There are factors that you, where you, as a user of the environment, will not be able to change and you should be aware of those points. There are areas where your choices directly impact the folder path and the implementation of your namespace.

##1. Composer Name Parameter##

The first data relevant to the package install path is the name you provide to Composer.

###What is the purpose of the name parameter?###

@makenowjust
makenowjust / npm2git.js
Created March 24, 2016 10:02
Bye npm, Hello Git repository.
'use strict'
/*
* Rewrite package.json to get dependencies from Git repository instead of npm.
*
* See also: https://medium.com/@azerbike/i-ve-just-liberated-my-modules-9045c06be67c
* and: http://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm
*
* Usage: cd /path/to/your/package && node npm2git
*
* This script is warning because:
<?php
namespace GoetasWebservices\Xsd\XsdToPhp\Php;
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPClass;
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPProperty;
use Zend\Code\Generator\ClassGenerator;
use Zend\Code\Generator\DocBlock\Tag\VarTag;
use Zend\Code\Generator\DocBlockGenerator;
use Zend\Code\Generator\MethodGenerator;
@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