Skip to content

Instantly share code, notes, and snippets.

@mortenscheel
mortenscheel / functions.sh
Last active September 10, 2022 14:31
Laravel specific git hooks for post-checkout and post-merge
#!/usr/bin/env bash
NC='\033[0m' # No Color
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
RED='\033[0;31m'
MAGENTA='\033[0;35m'
notify_about_actions_required() {
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)"
@spiermar
spiermar / nginx.conf
Created September 12, 2018 06:42
Nginx RMTP to HLS and DASH
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginx.pid;
events {
@SeppPenner
SeppPenner / Installing Python 3.7.4 on Raspbian.rst
Last active May 9, 2024 21:52
Installing Python 3.7.4 on Raspbian

Installing Python 3.7.4 on Raspbian =================================

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).

@danieldbower
danieldbower / .bashrc
Created March 4, 2014 02:21
Disable -m (message parameter) in git command in bashrc
function git {
for arg
do
if [[ $arg == -m* || $arg == -[^-]*m* ]]
then
annoy_me
return 1
fi
done
command git "$@"
@romainneutron
romainneutron / gist:5340930
Created April 8, 2013 21:59
Download large files using Guzzle
<?php
use Guzzle\Http\Client;
require __DIR__ . '/vendor/autoload.php';
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$handle = fopen($tmpFile, 'w');
$client = new Client('', array(
Client::CURL_OPTIONS => array(
@kevinbarrett
kevinbarrett / NSFileManager+DoNotBackup.h
Created March 8, 2012 18:02 — forked from tibr/NSFileManager+DoNotBackup.h
Setting the do not backup attribute in different iOS versions
@interface NSFileManager (DoNotBackup)
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
@end