Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Swasey mig

  • LivingSocial
  • Washington DC
View GitHub Profile
@parse
parse / shell.c
Created May 11, 2011
Simple shell in C
View shell.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>
@burningTyger
burningTyger / arch.sh
Last active Mar 15, 2022
Install Arch
View arch.sh
# 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
@denmarkin
denmarkin / resque.rake
Created Sep 20, 2011
My rake task for clearing Resque queues and stats
View resque.rake
# 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}..."
View kc60_end_user_notes.md

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 Jul 31, 2015
Windows 10 Cleanup Script
View Windows10Cleanup.ps1
<#
.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"`
@thoroc
thoroc / Debloat-Windows10.ps1
Created Aug 18, 2015
Windows 10 PowerShell script to disable E.T. features ....
View Debloat-Windows10.ps1
<#
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
@pcolby
pcolby / ! XPS 13.md
Last active Aug 24, 2017
XPS 13 9343
View ! XPS 13.md

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 Nov 21, 2015
LiveISO Part of ArchLinux Virtualbox Guest Install Script
View vbox_arch.sh
#!/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 Oct 16, 2011
Shortest simplest sweetest web "hello {NAME}" in Ruby
View config.ru
run ->(e){ p=Hash[*e['QUERY_STRING'].split(/[&=]/)]; [200, {'Content-type'=>'text/html'}, ["Hello #{p['name']}!"]] }
View active-support-test-case.diff
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))