Skip to content

Instantly share code, notes, and snippets.

View JokerQyou's full-sized avatar

Joker_ JokerQyou

View GitHub Profile
@adamv
adamv / cmus
Last active May 20, 2016 15:42
#!/bin/bash
# kill the media key program on exit
trap 'kill $(jobs -p)' EXIT
# prevent iTunes from capturing media keys
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2>/dev/null
# launch the media key program in the background
(cmus-media-keys) &
@josteink
josteink / on_stateful_code.txt
Last active October 21, 2020 05:37
On why stateful code is bad
On why stateful code is bad
===========================
STUDENT: Sir, can I ask a question?
TEACHER: Yes!
STUDENT: How do you put an elephant inside a fridge?
TEACHER: I don't know.
STUDENT: It's easy, you just open the fridge and put it in. I have another question!
TEACHER: Ok, ask.
STUDENT: How to put a donkey inside the fridge?
@xfanwu
xfanwu / xxf.zsh-theme
Last active November 10, 2022 19:53
Yet another theme for oh-my-zsh
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
# http://xiaofan.at
# 2 Jul 2015 - Xiaofan
# Machine name.
function box_name {

Git Cheat Sheet

Commands

Getting Started

git init

or

@hmartiro
hmartiro / zeromq-vs-redis.md
Last active April 14, 2024 20:33
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@ipmb
ipmb / ratelimit.nginxconf
Last active April 5, 2024 00:46
Nginx reverse proxy with rate limiting
upstream myapp {
server 127.0.0.1:8081;
}
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
server {
listen 443 ssl spdy;
server_name _;
@instagrim-dev
instagrim-dev / notify.py
Last active August 29, 2015 14:08 — forked from lukaszb/notify.py
#!/usr/bin/env python
from Foundation import NSUserNotification
from Foundation import NSUserNotificationCenter
from Foundation import NSUserNotificationDefaultSoundName
from optparse import OptionParser
def main():
parser = OptionParser(usage='%prog -t TITLE -m MESSAGE')
@Shoozza
Shoozza / agent.cmd
Last active April 20, 2022 02:45
Make Cmder work with ssh-agent
@ECHO OFF
SETLOCAL
GOTO:MAIN
REM
REM Info functions start
REM
REM Display version and copyright information
:VERSION
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@wkjagt
wkjagt / audio-book-reader.md
Last active April 12, 2024 14:18
How I built an audio book reader for my nearly blind grandfather

#How I built an audio book reader for my nearly blind grandfather

Tweet this - Follow me

Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.

####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an