Skip to content

Instantly share code, notes, and snippets.

@7696122
7696122 / css-grid-newspaper-layout.markdown
Created December 31, 2022 23:08
CSS Grid: Newspaper Layout
@7696122
7696122 / nix-on-macos-catalina.md
Created October 29, 2021 22:06 — forked from chriselsner/nix-on-macos-catalina.md
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@7696122
7696122 / .tmux.conf
Last active December 8, 2016 05:10
Work around copy and paste for thus
# https://robots.thoughtbot.com/how-to-copy-and-paste-with-tmux-on-mac-os-x
# pbcopy, pbpaste for TMUX
# brew install reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# For emacs mode
################################################################
# setw -g mode-keys emacs
# To copy:
# bind-key -t emacs-copy C-w copy-selection
# workaround clipboard for tmux {
# https://robots.thoughtbot.com/how-to-copy-and-paste-with-tmux-on-mac-os-x
# pbcopy, pbpaste for TMUX
# brew install reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# For emacs mode
################################################################
# setw -g mode-keys emacs
# To copy:
@7696122
7696122 / .tmux.conf
Last active December 8, 2016 05:12
Make tmux prefix to C-\ ( For emacs)
# bind prefix to "C-\" {
set-option -g prefix "C-\\"
# }
function checkInstalled {
installed=""
# if hash $1 2>/dev/null; then
if command -v $1 2>/dev/null; then
installed=0
else
installed=1
fi
return $installed
}
@7696122
7696122 / web-servers.md
Created June 1, 2016 21:28 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@7696122
7696122 / screen.clj
Last active August 29, 2015 14:18 — forked from jhartikainen/screen.clj
(import
'(java.awt Rectangle Dimension Robot Toolkit)
'(java.awt.image BufferedImage)
'(java.io File IOException)
'(javax.imageio ImageIO))
(defn take-screenshot []
(let [screen (.getScreenSize (Toolkit/getDefaultToolkit))
rt (new Robot)
img (.createScreenCapture rt (new Rectangle (int (.getWidth screen)) (int (.getHeight screen))))]
(setq serviceKey "인증키")
(setq serviceUrl "http://ws.bus.go.kr/api/rest/stationinfo/getStationByName")
(setq stationName "한강중학교")
(setq url (concat serviceUrl
"?ServiceKey="
serviceKey
"&stSrch="
stationName))
(browse-url url)