Skip to content

Instantly share code, notes, and snippets.

View it-can's full-sized avatar

M. Vugteveen it-can

View GitHub Profile
@twisty
twisty / php-syntax-check.md
Last active April 4, 2021 16:55
Check for PHP syntax errors for multiple files in a set of folders using PHP's "lint" option.

Syntax check php files in folders:

find ./foo ./bar \( -name "*.php" -or -name "*.phtml" \) -print0 | xargs -0 -n 1 php -l
@kenjis
kenjis / install-fuelphp.sh
Created December 15, 2011 04:12
FuelPHP Install Script
#!/bin/sh
# FuelPHP Install Script
#
# @author Kenji Suzuki https://github.com/kenjis
# @copyright 2011 Kenji Suzuki
# @license MIT License http://www.opensource.org/licenses/mit-license.php
if [ $# -lt 2 ]; then
echo "Install FuelPHP and Create Application Repository"
@sj26
sj26 / README.md
Created January 19, 2012 07:41
Run MailCatcher in the background, always, on OS X

Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.

If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.

Currently pow doesn't seem to pass websockets through correctly. Looking into this.

@cgsmith
cgsmith / emailclient.php
Created March 15, 2012 16:50
Gearman - Mass email PDF's
<?php
# create our client object
$gmclient= new GearmanClient();
# add the default server (localhost)
$gmclient->addServer();
# run email client in the background
$arr = array($_GET['id'],$_GET['msg']);
$data = serialize($arr); //serialize to send data
@arosenhagen
arosenhagen / magento-code-snippets.md
Last active April 8, 2024 09:21
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@johntyree
johntyree / getBlockLists.sh
Last active June 4, 2024 12:30
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@codee
codee / image_autorotate.php
Last active April 29, 2023 16:13
CodeIgniter: Automatic image rotation library
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* @file application/libraries/Image_autorotate.php
*/
class Image_autorotate
{
function __construct($params = NULL) {
if (!is_array($params) || empty($params)) return FALSE;
@stonehippo
stonehippo / remote_rpi.md
Last active December 21, 2017 01:16
Getting a Raspberry Pi set up for x11vnc and Bonjour (mDNS) access

Getting my Raspberry Pi set up

Getting on the network

Before the rest of this gist is useful, you've got to get your Raspberry Pi on the network. I followed the information from the Adafruint Learning System Raspberry Pi tutorials, which can be found at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup.

Couple of additional network setup notes

The two files that are most important are

@nickleefly
nickleefly / forever.md
Last active December 13, 2016 10:26
forever your node app

Install Forever:

npm install forever -g

now your can run forever

forever --help
forever start app.js
@ralphje
ralphje / pain.py
Created June 20, 2013 11:35
PAIN creation file
from lxml import etree, objectify
import datetime
import time
import os
import random
PAIN_IDENTIFIER = 'IA'
XSD_PATH = 'xsd'
class PainError(Exception):