Skip to content

Instantly share code, notes, and snippets.

View hug33k's full-sized avatar

Hugo SCHOCH hug33k

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hug33k on github.
  • I am hug33k (https://keybase.io/hug33k) on keybase.
  • I have a public key ASASNZIVcTru7cCuTd-MGMEZjVQgh_aHqJ5uVOUveS_wBAo

To claim this, I am signing this object:

@hug33k
hug33k / wip.js
Last active July 27, 2017 14:25
Facebook Messenger Emojis
imgs = document.getElementsByTagName("img");
for (let index = 0; index < imgs.length; index++) {
let item = imgs[index];
if (item.src.startsWith("https://static.xx.fbcdn.net/")) {
item.src = undefined;
switch(item.alt) {
case ":)":
item.alt = "🙂";
break;
case ":'(":
@hug33k
hug33k / git.fish
Created September 1, 2016 04:57
GIT aliases for Fish Shell
#!/usr/bin/env fish
# -*- mode:fish; tab-width:4 -*-
function gclone
set -l _name (echo $argv[1] | rev | cut -d"/" -f1 | rev | cut -d"." -f1)
git clone $argv[1]
cd $_name
@hug33k
hug33k / shell.py
Last active May 12, 2016 08:57
Python Binding for Shell
import signal
import subprocess
class Shell(object):
class CatchSigint:
def __init__(self, action):
self.action = action
@hug33k
hug33k / requester.py
Last active August 24, 2017 13:32
Python Requester
import json
import requests
class RequestError(Exception):
def __init__(self, value):
self.value = "Request Error : " + value
def __str__(self):
return repr(self.value)
@hug33k
hug33k / weather.fish
Created February 20, 2016 09:57
Fish Shell function for weather
#!/usr/bin/env fish
# -*- mode:fish; tab-width:4 -*-
function weather
set -l location $LOCATION
if [ (count $argv) -eq 1 ]
set location $argv[1]
else if [ (count $argv) -gt 1 ]
@hug33k
hug33k / st.fish
Last active March 17, 2021 00:44
Sublime Text integration for Fish Shell
#!/usr/bin/env fish
# -*- mode:fish; tab-width:4 -*-
function subl
if [ (count $argv) -gt 0 ]
sublime -w $argv[1..-1]
end