Skip to content

Instantly share code, notes, and snippets.

View saralilyb's full-sized avatar
🤷‍♀️

Sara Burke saralilyb

🤷‍♀️
View GitHub Profile
@botic
botic / gist:8738933
Created January 31, 2014 18:08
Sharp MATLAB on Retina MacBooks
# For a sharp UI you have to download the latest JDK for Mac OS X from Oracle
# and then replace MATLAB's outdated built-in JRE with a symlink the current one
mbp-retina:philipp$ cd /Applications/MATLAB_R2013b.app/sys/java/jre/maci64/
mbp-retina:philipp$ mv jre/ jre.original
mbp-retina:philipp$ ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/ jre
@dhh
dhh / test_induced_design_damage.rb
Last active November 2, 2024 00:52
This is an extraction from Jim Weirich's "Decoupling from Rails" talk, which explained how to apply the hexagonal design pattern to make every layer of your application easily unit testable (without touching the database etc). It only seeks to extract a single method, the EmployeesController#create method, to illustrate the design damage that's …
# Original Rails controller and action
class EmployeesController < ApplicationController
def create
@employee = Employee.new(employee_params)
if @employee.save
redirect_to @employee, notice: "Employee #{@employee.name} created"
else
render :new
end
@staltz
staltz / introrx.md
Last active July 17, 2025 08:33
The introduction to Reactive Programming you've been missing
// References:
// http://manual.mailmate-app.com/custom_key_bindings
// http://manual.mailmate-app.com/key_binding_selectors
// Custom
"E" = "expandAll:"; // expands all threads in current view
"T" = "showThread:"; // lower-case t doesn't work because it's bound to tags (?)
"l" = "copyAsLink:"; // copies message:// link for selected message
"y" = ( "selectWithFilter:", "#thread-id = ${#thread-id}", "archive:"); // http://protips.maxmasnick.com/mailmate-keyboard-shortcut-to-archive-all-messages-in-a-thread
"@[" = "backInHistory:"; // moves back in history, e.g. back to mailbox after performing a search. ESC also works for this.
@spiffytech
spiffytech / import.rb
Last active October 30, 2024 05:25 — forked from evanwalsh/import.rb
Imports a Squarespace dump into Jekyll
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'nokogiri'
require 'fileutils'
require 'safe_yaml'
require 'time'
require 'uri'
require 'open-uri'
@dkarter
dkarter / say.sh
Created October 24, 2015 19:00
OS X `Say` voices try out
echo 'Agnes'
say -v 'Agnes' "Isn't it nice to have a computer that will talk to you?"
echo 'Albert'
say -v 'Albert' "I have a frog in my throat. No, I mean a real frog!"
echo 'Alex'
say -v 'Alex' "Most people recognize me by my voice."
echo 'Alice'
say -v 'Alice' "Salve, mi chiamo Alice e sono una voce italiana."
echo 'Alva'
say -v 'Alva' "Hej, jag heter Alva. Jag är en svensk röst."
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 10, 2025 00:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@ninrod
ninrod / workflowy-to-org-mode.el
Created July 7, 2016 20:30
Convert from Workflowy export format to Org-Mode
(defun workflowy-to-org-mode ()
(interactive)
(let (count)
(while (not (eobp))
(setq count 0)
(while (looking-at " ")
(setq count (1+ count))
(forward-char 1))
(forward-char 1)
(delete-region (point-at-bol) (point))
@minimal
minimal / data.clj
Created September 21, 2016 13:37
ISO now date string in java 8 with clojure
(import
'[java.time ZonedDateTime]
'[java.time.format DateTimeFormatter])
(.. (ZonedDateTime/now) (format DateTimeFormatter/ISO_INSTANT))