Skip to content

Instantly share code, notes, and snippets.

View jugyo's full-sized avatar
🏠
Working from home

Kaz jugyo

🏠
Working from home
  • The League
  • New Jersey
View GitHub Profile
@joshschmelzle
joshschmelzle / remap-capslock-to-control-win10.md
Last active October 21, 2024 11:43
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@no6v
no6v / api_v1_1.rb
Last active December 14, 2015 09:29
Earthquake.once do
Module.new do |api_v1_1_forcibly|
def request(http_method, path, *arguments)
super(http_method, path.sub("/1/", "/1.1/"), *arguments)
end
OAuth::AccessToken.__send__(:prepend, api_v1_1_forcibly)
end
Module.new do |api_v1_1|
@maimai-swap
maimai-swap / upsidedown.rb
Last active December 10, 2015 19:28
Upside down tweet / earthquake plugin
# -*- coding: utf-8 -*-
# Upside down tweet / earthquake plugin
#
# upd:
#
require 'pp'
class Upd
@@values = {
'a'=>'ɐ','b'=>'q','c'=>'ɔ','d'=>'p','e'=>'ǝ','f'=>'ɟ','g'=>'ƃ','h'=>'ɥ','i'=>'ı',
'j'=>'ɾ','k'=>'ʞ','l'=>'l','m'=>'ɯ','n'=>'u','o'=>'o','p'=>'d','q'=>'b','r'=>'ɹ',
@ayumin
ayumin / build_ruby.sh
Created April 30, 2012 14:44
Ruby compile option (Mac OSX)
#!/usr/bin/sh
make realclean
autoconf
./configure --prefix=~/tmp/ruby-trunk \
--with-gcc=gcc-4.2 \
--with-arch=x86_64 \
--with-readline-dir=/usr/local \
@victusfate
victusfate / Gemfile
Created May 10, 2011 00:06 — forked from dodeja/Gemfile
Rails 3.1 Beta 1 on Heroku Working Config
# source 'http://rubygems.org'
source :gemcutter
gem 'rails', '3.1.0.beta1'
# Asset template engines
gem 'json'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
# -*- coding: utf-8 -*-
#earthquake.gem plugin
#javascript via phantomjs
require 'tempfile'
def do_bmklt(js,url)
tmp = Tempfile.new("tmpjs")
begin
tmp.puts js
##earthquake.ge plugin
##post url to instapaper.com
Earthquake.init do
_ = config[:instapaper] ||= {}
_[:user] ||= ''
_[:password] ||= ''
command :instapaper do |m|
tweet = twitter.status(m[1])["text"]
#!/usr/bin/env node
//http://vimeo.com/22429969
var fs = require('fs');
var spawn = require('child_process').spawn;
var cap = "/path/to/cap.jpg";
var glt = "/path/to/cap_glitch.jpg";
@mbulat
mbulat / gist:892544
Created March 29, 2011 15:21
Earthquake plugin to open a link in a tweet
# Pass in a tweet id to open a link in the text
#
# :open $xx
Earthquake.init do
command %r|^:open\s+([^\/\s]+)$|, :as => :open do |m|
twitter.status(m[1]).tap do |s|
if s["text"]
link_match = s["text"].match(/(https?:\/\/\S*)/)
if link_match
Launchy.open(link_match[0])
require 'ruby-debug'
require 'socket'
require 'forwardable'
class SporkDebugger
DEFAULT_PORT = 10_123
HOST = '127.0.0.1'
extend Forwardable
def_delegators :state, *[:prepare_debugger, :initialize]