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 },
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"
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
peterhost /
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
# ---------------------------------------------------------------------------
# FIND string in (regular) files
# -> 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 /
Created Nov 25, 2010
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
# ------------------------------------------------------------------------------
# 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)
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 :
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 microdata-tool-bookmarklet-pretty.js
// modified from code of "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 / quix.txt
Created Nov 27, 2011
Peter Host's custom Quix commands
View quix.txt
> Peter Host's Custom Quix Commands
> TITLE: quix.txt
edit Edit my Quix Commands

ccd dir :

$ cat client1

$ cat client2
peterhost / markdown.vim
Created Oct 15, 2019
Here's a tweaked version of the `vim-markdown/ftplugin/markdown.vim` (from plasticboy's vim-markdown extension) which displays numbered entries for the `:Toc` command. As I have no idea if the issue you opened is of interest for plasticboy, I did it directly in the `s:Toc()` function (the only part of the code I edited). It should be parameteriz…
View markdown.vim
"TODO print messages when on visual mode. I only see VISUAL, not the messages.
" Function interface phylosophy:
" - functions take arbitrary line numbers as parameters.
" Current cursor line is only a suitable default parameter.
" - only functions that bind directly to user actions:
" - print error messages.
You can’t perform that action at this time.