Skip to content

Instantly share code, notes, and snippets.

@stagas
stagas / how-to-run-apache-and-node.js-together-the-right-way.markdown
Created December 24, 2010 14:45
How to run Apache and Node.js together (the right way)

Step 1

Get a VPS that offers 2 or more IP addresses.

Step 2

From the WHM cPanel, find the menu item Service Configuration, select Apache Configuration and then click on Reserved IPs Editor.

Step 3

@jonathonbyrdziak
jonathonbyrdziak / cron.class.php
Created April 3, 2012 22:13
Wordpress Cron Job Class. Makes Cronning a snap!
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
* @copyright Copyright (C) 2011+ Redrokk Interactive Media
*
* @version 0.1
*/
@RyanBalfanz
RyanBalfanz / ico2cur.py
Created April 12, 2012 22:29
Convert an ICO file to a CUR file
#!/usr/bin/env python
# coding: utf-8
from optparse import OptionParser
import sys
usage = """%prog infile [options]
Reads an ICO file and writes a CUR file. The ICO file should contain a single
image. If no outfile name is provided, the infile name is used to create an
@fideloper
fideloper / vhost.py
Last active June 17, 2024 11:58
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#
@fideloper
fideloper / usevm.md
Created June 6, 2012 02:24
You should develop in a Virtual Machine

#You should do all your LAMP development in a Virtual Machine

##Here's Why:

Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.

Our computers become powerful develoment machines similar to the servers our apps will eventually live on.

Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!

<?php
if(!r::is_ajax()) notFound();
header('Content-type: application/json; charset=utf-8');
$data = $pages->find('blog')->children()->visible()->paginate(10);
$json = array();
@christiangenco
christiangenco / download website assets
Created January 20, 2014 23:23
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@yannickcr
yannickcr / Readme.md
Created September 5, 2014 11:29
jQuery 1.9.1 + Browserify

jQuery 1.9.1 + Browserify

Install jQuery 1.9.1 and Browserify-shim

npm install jquery@1.9.1 --save
npm install browserify-shim --save-dev

Add the following entries in your package.json

@msimpson
msimpson / scroll-test.html
Last active November 17, 2020 10:09
Mac OSX Inertial Scrolling Buffer (http://jsfiddle.net/n7bk6pb9/1/)
<!doctype html>
<html>
<head>
<title>Scroll Test</title>
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;