Skip to content

Instantly share code, notes, and snippets.

View jeffkreeftmeijer's full-sized avatar
🦞

Jeff Kreeftmeijer jeffkreeftmeijer

🦞
View GitHub Profile

Rails with mssql on macOS

Start mssql in docker

docker pull microsoft/mssql-server-linux:2017-latest
docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=B4n44n123' -p 1401:1433 --name sql1 -d microsoft/mssql-server-linux:2017-latest
docker ps -a
<ul>
<li>
<article>
<time datetime="2017-10-17">2017-10-17</time>
<span><a href="/vim-reformat-dates/">Find, convert and replace dates with Vim substitutions</a></span>
</article>
</li>
<li>
<article>
<time datetime="2017-09-19">2017-09-19</time>
@jeffkreeftmeijer
jeffkreeftmeijer / math.ex
Created August 26, 2017 20:58
POC for type spec tests with StreamData.
defmodule Math do
@spec square(integer) :: integer
def square(a) do
a * a
end
end
@jeffkreeftmeijer
jeffkreeftmeijer / roast_potatoes.md
Last active August 21, 2017 17:02
Recipes I kept having to look up.

Roast potatoes

Roast potatoes

Potatoes

  • Salt
  • 1/2 teaspoon baking soda (~4g)
  • Potatoes

Boil for ~10 minutes

Property-based testing in Elixir using PropEr

# Use Ctrl-a instead of Ctrl-b as the tmux prefix
set-option -g prefix C-a
# Set the base index to 1 instead of 0 for both windows and panes.
set-option -g base-index 1
set-option -g pane-base-index 1
# Use vim keybindings in copy mode
setw -g mode-keys vi
@jeffkreeftmeijer
jeffkreeftmeijer / README.md
Last active January 30, 2019 09:45
enough.css is a tiny CSS style sheet with most of the styling you'll need for that blog of yours. It moved to https://github.com/jeffkreeftmeijer/enough.css
require 'socket'
require 'rack'
require 'rack/lobster'
app = Rack::Lobster.new
server = TCPServer.new 5678
while session = server.accept
request = session.gets
puts request
@jeffkreeftmeijer
jeffkreeftmeijer / appsignal-dark.terminal
Last active November 19, 2016 12:48
appsignal.terminal (https://github.com/jeffkreeftmeijer/appsignal.terminal), with SF Mono 14pt, 1,25 line spacing and disabled bells
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjE5MjE1Njg2MjcgMC4yNDcwNTg4MjM1IDAuMjc0NTA5ODAzOQAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@jeffkreeftmeijer
jeffkreeftmeijer / no_testsuites_element.xml
Last active September 25, 2016 11:01
JUnit XML test fixtures
<?xml version="1.0"?>
<testsuite errors="0" failures="0" name="Elixir.JunitXmlTest" tests="0" time="0.00"></testsuite>