Skip to content

Instantly share code, notes, and snippets.

View grantwinney's full-sized avatar

Grant grantwinney

View GitHub Profile
// ==UserScript==
// @name Stack Experiment Off
// @author CertainPerformance
// @description Turns off the voting experiment - shows true vote totals on pageload and after voting
// @description https://meta.stackoverflow.com/questions/390178/new-popup-message-when-voting-on-a-question
// @version 1.1.1
// @include /^https://stackoverflow\.com/questions/(?:\d+|tagged|search)/
// @run-at document-start
// @grant none
// ==/UserScript==
@robotnealan
robotnealan / sites-available-ghost
Last active March 20, 2019 09:33
DigitalOcean LetsEncrypt Nginx Config
server {
listen 80;
listen [::]:80;
server_name robertnealan.com;
root /var/www/ghost/system/nginx-root;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@minsko
minsko / sessions.json
Created February 15, 2016 14:49
KidzMash Sessions 2016
[{"Id":3663,"SessionTime":"0001-01-01T00:00:00","SessionStartTime":"2016-01-05T09:00:00","SessionEndTime":"2016-01-05T10:00:00","Room":null,"Rooms":["Acacia - Sessionz"],"Title":"Kidz‐in‐3D","Abstract":"Make a tetrahedron with 6 toothpick. Make 4 of these and you have one 2 high.\r\n\r\nMake 4 of these and you have one 4 high. Make 4 of these and you have one 8\r\n\r\nhigh. Make 4 of these and you have one 16 high. Within an short time, we can\r\n\r\nhave one as tall as a child.","SessionType":"Kidz Mash","Tags":["Other"],"Category":"Programming Principles","Speakers":[{"Id":"3a7a56bf-23b2-49a9-b8e5-95767941ca5a","FirstName":"Aydin","LastName":"Akcasu","GravatarUrl":"//www.gravatar.com/avatar/f9da7b144fc14837d2f3599c21de129f"}]},{"Id":3675,"SessionTime":"0001-01-01T00:00:00","SessionStartTime":"2016-01-05T10:30:00","SessionEndTime":"2016-01-05T11:30:00","Room":null,"Rooms":["Acacia - Sessionz"],"Title":"The Magic of Glycerin","Abstract":"Bubbles that bounce? Homemade soap? Snow globes and bathtub crayons? Wha
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active April 25, 2024 12:11
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@rbnpi
rbnpi / TuningSonicPi.md
Last active November 8, 2022 19:40
Tuning Sonic Pi for best performance

Tuning Sonic Pi for best performance

Several of the programs I write for Sonic Pi push it fairly close to the limit when run on a Raspberry Pi. This note gives some tips on to how to maximise the performance on that platform. Of course, if you run Sonic Pi on Mac OSX,or a Windows PC then the performance is much better on these more powerful platforms and some of the issues may not arise.

Over-clocking your Pi

By increasing the voltage applied to the Pi processor, and running it at a higher clock frequency than normal it is possible to achive significant gains in performance. The down side is that you may reduce the lifetime of your Pi. There are five levels that can be configured: None, Modest, Medium, High and Turbo. I routinely run my Raspberry Pis with Medium Overclocking and have noticed no ill effects on any of them.

If you wish to apply some over-clocking you do so by running the program raspi-config from the command line. Having logged on, from the command line before you start the gra

@coreyhaines
coreyhaines / Get raw json from EventBoard
Last active January 2, 2016 14:29
EventBoard Stuff Thanks to Pete Hodgson @ph1 for figuring this out.
# List of conferences
curl -d {} -H "Content-Type:application/json" https://eventboard.falafel.com/ConferenceService2/ConferenceListEx
# The 59 specifies the version according to the latest version that is present in the DataVersion attribute of the conference list above
curl http://cdn.eventboard.falafel.com/conferencecatalogs/codemash2014.59.data.json
@chilts
chilts / alexa.js
Created October 30, 2013 09:27
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;
@mwhite
mwhite / git-aliases.md
Last active April 30, 2024 11:32
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@jonathanhculver
jonathanhculver / checkmail.py
Created December 14, 2012 02:02
Python script to check gmail for new email every minute and send to Arduino over serial.
import imaplib, serial, struct, time
class Mail():
def __init__(self):
self.user= 'USER'
self.password= 'PASS'
self.ser = serial.Serial('/dev/tty.usbmodem621', 9600)
self.M = imaplib.IMAP4_SSL('imap.gmail.com', '993')
self.M.login(self.user, self.password)