Skip to content

Instantly share code, notes, and snippets.

View LaurentFough's full-sized avatar
👨‍🔬
🕺👨‍✈️🕵️‍♂️

Łaurent ʘ❢Ŧ Ŧough LaurentFough

👨‍🔬
🕺👨‍✈️🕵️‍♂️
View GitHub Profile
@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
@chrisyour
chrisyour / Folder Preferences
Created December 4, 2010 20:05
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
@mixonic
mixonic / server.js
Created April 28, 2011 22:49
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//
@rwoeber
rwoeber / gist:1010044
Created June 6, 2011 10:25
rather minimalistic ipfw rule-script (FreeBSD)
#!/bin/sh
# inspired by 1fbsdguru's stuff at:
# http://www.cyberciti.biz/faq/howto-setup-freebsd-ipfw-firewall/
# do not forget to set right ip!
ip="my.ip.address"
IPF="ipfw -q add"
# Loopback
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@tvwerkhoven
tvwerkhoven / battery_logger.sh
Last active April 6, 2022 02:56
Log Macbook battery status with system_profiler(8) and ioreg(8), see http://home.strw.leidenuniv.nl/~werkhoven/etc/battlog.html
#!/bin/bash
#
# About
# =====
#
# Log battery info from command-line with SYSTEM_PROFILER(8) and IOREG(8) to a
# user-configurable directory.
#
# Run with -h to see usage options.
#
@dnaber-de
dnaber-de / dna-ip-to-admin-bar.php
Last active July 13, 2017 21:28
WordPress Plugin to show the Server Address (IP) in Admin-Bar
<?php
/**
* Plugin Name: dna IP to Admin Bar
* Plugin URI: https://gist.github.com/dnaber-de/5219882
* Description: Shows the current Server IP in the Admin Bar. (Requires PHP 5.3)
* Author: David Naber
* Author URI: http://dnaber.de/
* Version: 2013.03.22
* License: MIT
@jpawlowski
jpawlowski / brew-sync.sh
Last active September 26, 2023 19:54
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@openrijal
openrijal / ip2geo.sh
Created April 3, 2013 18:33
Bash Script to find Geolocation from IP Addresses in apache's access log. You need to have "geoiplookup" package from GeoLite package. The excerpts are taken from http://danielmiessler.com/blog/a-simple-script-for-harvesting-dns-country-state-and-city-information-from-a-list-of-ip-addresses
#!/usr/bin/env bash
cat /var/log/apache2/access_log | awk '{print $1}' > ips.txt
uniq ips.txt > uniqips.txt
IPS=`cat uniqips.txt`
for i in $IPS
do
echo "$i,`geoiplookup $i | cut -d "," -f2 | sed -e 's/^[\t]//'`" >> ipinfo.csv
done
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active June 5, 2024 04:06
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix