Skip to content

Instantly share code, notes, and snippets.

@k3mist
k3mist / libinput-gestures.conf
Created March 17, 2020 02:35 — forked from SkyBehind/libinput-gestures.conf
My libinput config for multi-touch gestures (using Linux on Mac). I use 3-finger side swipe for forward and back, 3-finger up/down for showing all windows, and 4-finger up/down to switch desktops.
# Configuration file for libinput-gestures.
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
# maintain compatibility with original format configuration files).
@k3mist
k3mist / sse.go
Created November 18, 2017 16:43 — forked from ismasan/sse.go
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@k3mist
k3mist / script.js
Last active October 24, 2017 22:07
var d = document,
dl = d.location,
w = window,
domready = false,
settings,
page_styles = {},
busy = false;
if (typeof safari == 'object') {
safari.self.addEventListener("message", pong, false);
@k3mist
k3mist / github-to-bitbucket
Created May 24, 2017 21:16 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone git@bitbucket.org:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync git@github.com:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
# User
if [[ $UID -eq 0 ]]; then
local user_host='%{$fg[red]%}%n@%m%{$reset_color%}'
else
local user_host='%{$fg[yellow]%}%n@%m%{$reset_color%}'
fi
# Current directory
@k3mist
k3mist / update-hosts
Created May 14, 2014 00:55
Ad blocker? /lol
#!/bin/bash
set -eu
HOSTS_SAVE=mvpshosts-`date +\\%F_%T`
echo 'Fuck ads'
echo
echo 'Downloading MVPS Hosts file...'
wget -c http://www.mvps.org/winhelp2002/hosts.txt -O ~/Downloads/mvpshosts/$HOSTS_SAVE
echo