Skip to content

Instantly share code, notes, and snippets.

Peter Host peterhost

Block or report user

Report or block peterhost

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View patch-wrp_vertical_split.patch
--- comm.c.orig 2003-09-08 14:25:08.000000000 +0000
+++ comm.c 2006-07-07 02:39:24.000000000 +0000
@@ -309,6 +309,7 @@ struct comm comms[RC_LAST + 1] =
{ "vbellwait", ARGS_1 },
{ "verbose", ARGS_01 },
{ "version", ARGS_0 },
+ { "vert_split", NEED_DISPLAY|ARGS_0 },
{ "wall", NEED_DISPLAY|ARGS_1},
{ "width", ARGS_0123 },
{ "windowlist", NEED_DISPLAY|ARGS_012 },
@peterhost
peterhost / screen.rb
Created Oct 27, 2010
homebrew formula for screen, hacked from macports
View screen.rb
require 'formula'
# This duplicates the system "screen", but fixes the ability
# to use vertical splits.
class Screen <Formula
# this tarball contains a quick and dirty fix :
# 1 - included a copy of the ".orig" files required by the 'patch-wrp_vertical_split.patch' :p0 patches,
# in the tarball's root dir
# 2 - copied 'vproc_priv.h' in the root of the tarball (required by 'patch-screen.c' (osX10.5) and
View patch-screen.c-leopard-modif.diff
--- screen.c.orig 2009-01-21 12:06:11.000000000 +0800
+++ screen.c 2009-01-21 12:08:27.000000000 +0800
@@ -101,6 +101,11 @@
#include "logfile.h" /* islogfile, logfflush */
+#ifdef __APPLE__
+#include <vproc.h>
+#include "vproc_priv.h"
+#endif
@peterhost
peterhost / Filtrer une recherche twitter
Created Jul 28, 2011
Filtrer une recherche twitter
View Filtrer une recherche twitter
Ca arrive à tout le monde : vous désirez suivre une tendance sur twitter et faites une recherche sur vos mots clé préférés. Mais un utilisateur pollue ce mot clé avec ses inepties à répétition. C'est un spammeur, un troll, il provoque en vous des montées d'énervement qui nuisent à votre Zen quotidien.
La solution est simple : filtrez le.
Twitter met à votre disposition quelques outils pour affiner vos recherches. La liste est ici : http://search.twitter.com/operators
Cela permet de tout faire ou presque.
Le cas le plus commun est "comment faire en sorte que les messages du troll ne s'affichent plus dans ma recherche ?"
Exemple concret :
View ccd.md

ccd dir :

$ cat client1
ifconfig-push 10.20.30.21 10.20.30.22

$ cat client2
ifconfig-push 10.20.30.17 10.20.30.18
View microdata-tool-bookmarklet-pretty.js
// modified from code of "JQuerify" bookmarklet
// http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet
(function() {
function z(a, b) {
var c = document.createElement("script");
c.src = a;
var d = document.getElementsByTagName("head")[0], e = !1;
c.onload = c.onreadystatechange = function() {
!e && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") && (e = !0, b(), c.onload = c.onreadystatechange = null, d.removeChild(c));
};
@peterhost
peterhost / findall.sh
Created Nov 12, 2010
FIND string in files: bash script to easilly find a given string in all files of a given type in the current directory and its subdirectories (.git dirs excluded) and print the results with some colors
View findall.sh
# ---------------------------------------------------------------------------
# FIND string in (regular) files
# https://gist.github.com/674341
# -> finds a given string in all files of a given type in the current
# directory and its subdirectories (.git directory contents excluded,
# directories excluded)
function findall()
{
#CUSTOM COLORS : declare them as local variables so as not to clutter your BASH ENVIRONMENT
@peterhost
peterhost / quix.txt
Created Nov 27, 2011
Peter Host's custom Quix commands
View quix.txt
> Peter Host's Custom Quix Commands
> TITLE: quix.txt
> GITHUB: https://raw.github.com/peterhost/quix/master/quix.txt
> MORE: http://quixapp.com
>---------------------
> QUIX
>---------------------
edit http://gist.github.com/gists/1397755/edit Edit my Quix Commands
@peterhost
peterhost / node_debian_init.sh
Created Nov 25, 2010
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
View node_debian_init.sh
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
You can’t perform that action at this time.