Skip to content

Instantly share code, notes, and snippets.

View klein0r's full-sized avatar
🏠
Working on my smart home

Matthias Kleine klein0r

🏠
Working on my smart home
View GitHub Profile
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@roderik
roderik / .travis.yml
Last active January 30, 2020 06:07
Installing Apache with PHP in Travis-CI
language: php
php:
- 5.3
- 5.4
before_script:
- sudo apt-get install apache2
- sudo a2enmod actions
- sudo a2enmod rewrite
@cordoval
cordoval / GroupBy.php
Created October 5, 2011 22:35 — forked from anonymous/GroupBy.php
Grouping filter for Twig.
<?php
namespace BlackRook\TaskBundle\Twig\Extension;
use DateTime,
Twig_Extension,
Twig_Environment,
Twig_TemplateInterface,
Twig_Error_Runtime,
Twig_Filter_Method;
@davidalexander
davidalexander / gist:1086455
Last active September 7, 2023 07:42
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

@sbisbee
sbisbee / firstclass.php
Created December 17, 2010 23:08
First-class functions in PHP.
<?php
/*
* A demonstration of first-class functions in PHP.
* Blog post: http://www.sbisbee.com/blog.php?id=2352301864
*
* By Sam Bisbee <www.sbisbee.com> on 2010-12-17
*/
function makeLouder($fn)
{
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh