Skip to content

Instantly share code, notes, and snippets.

View felixbuenemann's full-sized avatar
💭
I may be slow to respond.

Felix Bünemann felixbuenemann

💭
I may be slow to respond.
View GitHub Profile
@stefansundin
stefansundin / git-bundle-hook.md
Last active September 6, 2024 00:10 — forked from 8bitDesigner/1.md
Git post-checkout and post-merge hooks to simplify bundling and other tasks.

Make bundleing and npm installing easy

These git hooks runs bundle or npm install automatically whenever you:

  • git checkout a new branch with a different Gemfile or package.json.
  • git pull a change to Gemfile or package.json.

How to install

  1. cd awesome_git_repo
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#!/usr/bin/env sh
COOKIEURI='http://www.adobe.com/cfusion/tdrc/index.cfm?product=acrobat_pro'
TRIALBASE='http://trials3.adobe.com/AdobeProducts/'
TRIALLINK='http://prodesigntools.com/adobe-cc-direct-download-links.html'
GETCOOKIE="$(curl -Lsc - "$COOKIEURI" -o /dev/null | grep MM_ )"
ONECOOKIE=$(echo "$GETCOOKIE" | sed 's|.*LS.||')
cookcurl(){ echo $(basename "$@"); curl -C - -ORLb MM_TRIALS='$COOKIE' "$@" ;}
@tmaiaroto
tmaiaroto / image-proxy.conf
Last active November 20, 2024 13:00
Nginx Image Filter Resize Proxy Service
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.
@massar
massar / server-git.conf
Created March 6, 2014 21:14
Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# [email protected] - http://jeroen.massar.ch
server {
listen 192.0.1.1:80;
listen [2001:db8::1]:80;
# Redirect all non-HTTPS traffic to the HTTPS variant
return 301 https://$host$request_uri;
}
CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french );
ALTER TEXT SEARCH CONFIGURATION fr ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, french_stem;
CREATE TEXT SEARCH CONFIGURATION en ( COPY = english );
ALTER TEXT SEARCH CONFIGURATION en ALTER MAPPING
FOR hword, hword_part, word WITH unaccent, english_stem;
CREATE TEXT SEARCH CONFIGURATION de ( COPY = german );
ALTER TEXT SEARCH CONFIGURATION de ALTER MAPPING
@sfelde
sfelde / typo3-nginx
Created February 1, 2014 13:10
nginx-typo3
server {
# listen 80; ## listen for ipv4; this line is default and implied
root /srv/dlf;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name _;
location = /favicon.ico {
@EdgeCaseBerg
EdgeCaseBerg / image_size.py
Last active January 12, 2021 09:52
Python function to read out size data for image types with no dependencies. Found originally at http://stackoverflow.com/questions/15800704/python-get-image-size-without-loading-image-into-memory and I added the ICO handler. (just ico not cursor files)
#-------------------------------------------------------------------------------
# Name: get_image_size
# Purpose: extract image dimensions given a file path using just
# core modules
#
# Author: Paulo Scardine (based on code from Emmanuel VAÏSSE), Ethan Eldridge (ICO)
#
# Created: 26/09/2013
# Copyright: (c) Paulo Scardine 2013
# Licence: MIT
@matt448
matt448 / slack_nagios.sh
Last active February 13, 2023 15:38
Script to post Nagios notifications into a Slack channel
#!/bin/bash
# This script is used by Nagios to post alerts into a Slack channel
# using the Incoming WebHooks integration. Create the channel, botname
# and integration first and then add this notification script in your
# Nagios configuration.
#
# All variables that start with NAGIOS_ are provided by Nagios as
# environment variables when an notification is generated.
# A list of the env variables is available here:
@justinmayer
justinmayer / Menlo-for-Powerline.zip
Last active April 16, 2025 10:12
Menlo font, patched for Powerline. Includes regular, bold, italic, and bold italic variants.