Skip to content

Instantly share code, notes, and snippets.

View rogeliodh's full-sized avatar

Rogelio Domínguez Hernández rogeliodh

  • Mexico City
  • 15:43 (UTC -06:00)
View GitHub Profile
@rogeliodh
rogeliodh / fetch_news.sh
Created January 4, 2012 14:34
[Bash] Script to fetch news with calibre
#!/bin/bash
# This is free and unencumbered shell script released into the public domain.
#
####################### Begin Customization Section #############################
#
# Name of the recipe to fetch. You can run:
# ebook-convert --list-recipes
# to look for the correct name. Do not forget the .recipe suffix
RECIPE="La Jornada (Mexico).recipe"
@jordanorelli
jordanorelli / fabextras.py
Created February 19, 2012 00:00
runtime-generated fabric connection functions, yay
from fabric.api import env
import os
import string
_conf_root = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'conf')
_conf_dirs = [x for x in os.listdir(_conf_root)
if os.path.isdir(os.path.join(_conf_root, x))
and x != 'base']
def _mk_sethost_fn(host_dicts, context):
@dmytro
dmytro / ssh-multi.sh
Created October 31, 2012 03:46
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
<style>
.twitter-btn {
font: normal normal normal 13px/26px 'Helvetica Neue',Arial,sans-serif;
height: 28px;
border-radius: 4px;
max-width: 100%;
box-sizing: border-box;
position: relative;
background-color: #F8F8F8;
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@rothgar
rothgar / install-tmux
Last active April 5, 2023 06:53 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@mauvm
mauvm / gist:5de07085f3b51e117378
Created July 26, 2015 11:57
An "envsubst" alternative for replacing env variables in NGinX site configurations (for using it with Docker)
#!/bin/bash
# NOTE: Brackets are not supported and '$' in values will break the script.
mkdir /etc/nginx/sites-enabled 2> /dev/null
for file in /etc/nginx/sites-available/*.conf
do
TPL=$(cat $file)
for row in $(env)
do

KC60 Keyboard end-user tips, tricks, programming notes, etc.

Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.

The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key

#Programming the KC60 on a Mac

  1. Download and unzip the [TKG-Toolkit][1] from Github (click on download zip on the right).
  2. Download the Mac version of [jq][2] (it will be named jq-osx-x86_64 or something similar)
    • rename the downloaded file to jq.
  3. Install dfu-programmer using [homebrew][3] brew install dfu-programmer.
  4. Go into the tkg-toolkit-master/linux/bin folder.
  5. Rename The existing jq file to jq.bak or something similar and drag in the new jq file you just downloaded.
  6. Exit the bin folder and return to the linux Folder.
  7. Open the file called reflash.sh in a text editor.

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.