Skip to content

Instantly share code, notes, and snippets.

View mig's full-sized avatar

Matthew Swasey mig

  • LivingSocial
  • Washington DC
View GitHub Profile
@parse
parse / shell.c
Created May 11, 2011 07:31
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
@thoroc
thoroc / Debloat-Windows10.ps1
Created August 18, 2015 14:46
Windows 10 PowerShell script to disable E.T. features ....
<#
NAME
Debloat-Windows10.ps1
DESCRIPTION
Debloats and customizes Windows 10 Enterprise N LTSB.
It changes your privacy options in the settings app and disables scheduled tasks and services that are there
to gather information about you. It also tweaks the registry to customize settings, make your font display properly
on DPI scaling 125% and disable OneDrive completely. Windows Features are also disabled, such as Internet Explorer
and XPS Viewer, while others are enabled such as .NET framework 3.5. On top of it all, it appends new lines to your
hosts file that block Microsoft from collecting data on you, as well as enables or disables local policies to
@denmarkin
denmarkin / resque.rake
Created September 20, 2011 11:02
My rake task for clearing Resque queues and stats
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version
# see https://github.com/defunkt/resque/issues/49
# see http://redis.io/commands - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
@burningTyger
burningTyger / arch.sh
Last active February 3, 2023 01:52
Install Arch
# This guide is based on https://wiki.archlinux.org/index.php/User:Altercation/Bullet_Proof_Arch_Install
# compare for more details on each step. It's a great guide and seems to get frequent updates.
# This guide has a few changes that helped me to get thew bootloader running
# Start up the Live USB/CD and enable SSH:
# set a password for root to enable ssh login
# *
passwd
systemctl start sshd.service

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

@georgwacker
georgwacker / Windows10Cleanup.ps1
Created July 31, 2015 15:38
Windows 10 Cleanup Script
<#
.SYNPOSIS
Cleans unwanted pre-bundled Windows 10 applications
#>
$RemoveApps = "Microsoft.3DBuilder", "Microsoft.BingFinance", "Microsoft.BingFoodAndDrink", "Microsoft.BingHealthAndFitness", "Microsoft.BingNews",`
"Microsoft.BingSports", "Microsoft.BingTravel", "Microsoft.Weather", "Microsoft.Getstarted", "Microsoft.MicrosoftOfficeHub", "Microsoft.MicrosoftSolitaireCollection",`
"Microsoft.Office.OneNote", "Microsoft.People", "Microsoft.SkypeApp", "Microsoft.Windows.Photos", "Microsoft.WindowsCamera", "microsoft.windowscommunicationsapps",`
"Microsoft.WindowsMaps", "Microsoft.WindowsPhone", "Microsoft.WindowsReadingList", "Microsoft.WindowsSoundRecorder", "Microsoft.ZuneMusic", "Microsoft.ZuneVideo"`
@pcolby
pcolby / ! XPS 13.md
Last active August 24, 2017 19:50
XPS 13 9343

Just some notes on my XPS 13 (9343) setup.

See also mpalourdio/xps13.

DP-1
  -> DP-1-1
    -> DP-1-1-1: Dell 2007FPB (Left)  [eVGA DP3]
    -> DP-1-1-2: Dell 2007FPB (Right) [eVGA DP2]
 -&gt; DP-1-2: Dell U3014 (Middle) [eVGA DP1]
@kemadz
kemadz / vbox_arch.sh
Last active November 21, 2015 17:34
LiveISO Part of ArchLinux Virtualbox Guest Install Script
#!/bin/sh
# LiveISO Part of ArchLinux Virtualbox Guest Install Script
# system clock
# date `date +%m%d%H%M%Y.%S --date='-8 hour'`
ntpdate time.asia.apple.com
# partitions
sgdisk --zap-all /dev/sda
sgdisk \
@mislav
mislav / config.ru
Created October 16, 2011 18:32
Shortest simplest sweetest web "hello {NAME}" in Ruby
run ->(e){ p=Hash[*e['QUERY_STRING'].split(/[&=]/)]; [200, {'Content-type'=>'text/html'}, ["Hello #{p['name']}!"]] }
diff --git a/rinari.el b/rinari.el
index f74494b..febdd5f 100644
--- a/rinari.el
+++ b/rinari.el
@@ -195,10 +195,15 @@ argument allows editing of the test command arguments."
(or (string-match "test" (or (ruby-add-log-current-method)
(file-name-nondirectory (buffer-file-name))))
(rinari-find-test))
- (let* ((funname (ruby-add-log-current-method))
+ (let* ((funname (rinari-test-function-name))