Skip to content

Instantly share code, notes, and snippets.

💭
😘

Giulio Ungaretti giulioungaretti

View GitHub Profile
View hyper.json
{
"title": "Hyper",
"rules": [{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "fn",
"modifiers": {
"optional": [
"any"
]
@giulioungaretti
giulioungaretti / cloudSettings
Last active Apr 19, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-04-19T21:11:38.409Z","extensionVersion":"v3.2.8"}
@giulioungaretti
giulioungaretti / ta.zsh
Created Jan 27, 2018
tmux session attach
View ta.zsh
function ta (){
local NEW_SESSION=$(uuidgen)
tmux new-session -t $1 -s $NEW_SESSION ; tmux kill-session -t $NEW_SESSION
}
@giulioungaretti
giulioungaretti / color.js
Last active Jan 21, 2018
acme-ish chrome secure shell theme
View color.js
t.prefs_.set('color-palette-overrides', ['#424242','#b85c57','#57864e','#8f7734','#2a8dc5','#8888c7','#6aa7a8','#999957','#eeeea7','#f2acaa','#98ce8f','#b7b19c','#a6dcf8','#d0d1f7','#b0eced','#ffffec']);
t.prefs_.set('foreground-color', '#424242');
t.prefs_.set('background-color', '#ffffd7');
t.prefs_.set('cursor-color', '#424242');
View unkikitty.js
t.prefs_.set('color-palette-overrides', ["#ffffff","#d8277f","#17ad98","#dc8a0e","#775dff","#aa33e6","#149bda","#6c696e","#a7a5a8","#d8277f","#17ad98","#dc8a0e","#775dff","#aa33e6","#149bda","#322d34"]);
t.prefs_.set('foreground-color', "#6c696e");
t.prefs_.set('background-color', "#ffffff");
t.prefs_.set('cursor-color', "#6c696e");
View gist:f77d5e2f652155ed7d197a8822182fc7
//
// main.go
// Copyright (C) 2017 unga <giulioungaretti@me.com>
//
// Distributed under terms of the MIT license.
//
package main
import (
@giulioungaretti
giulioungaretti / main.go
Created Mar 8, 2017
simple file server with simple basic auth
View main.go
//
// main.go
package main
import (
"fmt"
"net/http"
"os"
"github.com/gorilla/securecookie"
View pubfwd.py
"""
An XPUB/XSUB broker that forwards subscriptions
"""
import os
import string
import sys
import time
from random import randint
from threading import Thread
View gist:b1e8617be08c2c7940765f4a994dedf4
async def proxy(websocket, path):
while True:
log = await zmqsocket.recv_multipart()
await websocket.send(log[1])
View mp.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 unga <giulioungaretti@me.com>
#
# Distributed under terms of the MIT license.
"""
Benchamrk mp queues
You can’t perform that action at this time.