This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linters-settings: | |
govet: | |
disable-all: true | |
enable: | |
- nilness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rust_playground(opts) | |
---@diagnostic disable-next-line: redefined-local | |
local opts = opts or {} | |
local copy = opts.copy or false | |
local open = opts.open or false | |
local char_to_hex = function(c) | |
return string.format('%%%02X', string.byte(c)) | |
end | |
local function urlencode(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tinygo version 0.25.0 darwin/amd64 (using go version go1.18 and LLVM version 14.0.0) | |
# go version go1.18.3 darwin/arm64 | |
tinygo build -wasm-abi=generic -target=wasi -o bin/main.wasm main.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
limitLoop.js - limit the frame-rate when using requestAnimation frame | |
Released under an MIT license. | |
When to use it? | |
---------------- | |
A consistent frame-rate can be better than a janky experience only | |
occasionally hitting 60fps. Use this trick to target a specific frame- | |
rate (e.g 30fps, 48fps) until browsers better tackle this problem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -lv | fzf | awk '{print $1}' | xargs git checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hub pr list | fzf | awk '{print $1}' | sed 's/\#//' | xargs hub pr checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
bar: null, | |
valAtInit: null, | |
valAtDRA: null, | |
init() { | |
this._super(...arguments); | |
console.log('init', this.bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This pre-commit hook will prevent you from continuing your work without resolving WIP commits | |
# It expects WIP commits to have the message `--wip-- [skip ci]` | |
# | |
# You can use the following commands to easily create and restore WIP commits: | |
# gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m "--wip-- [skip ci]"' | |
# gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1' | |
# | |
# To enable this hook, rename this file to "pre-commit". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "Spotify" is running then | |
tell application "Spotify" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.wrapper { | |
position: relative; | |
svg { | |
bottom: 50%; | |
left: 50%; | |
position: absolute; | |
right: 50%; | |
top: 50%; |
NewerOlder