Skip to content

Instantly share code, notes, and snippets.

View reset.css
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@yufengwng
yufengwng / zipping.txt
Created Mar 26, 2015
Commands for archiving and zipping files.
View zipping.txt
tar
===
create new gunzipped tar
$ tar cvzf <name>.tar.gz file <files>
extract from gunzipped tar
$ tar xvzf <name>.tar.gz
list contents of gunzipped tar
@yufengwng
yufengwng / usb.txt
Created Nov 24, 2016
Commands for managing usb devices
View usb.txt
view device filesystems
$ lsblk -f
view devices
$ udiskctl status
view device info
$ udiskctl info -b /dev/<id>
mount partition
@michaelficarra
michaelficarra / etsy-scrape.rb
Created Sep 13, 2011
download all the listing images from a given etsy shop
View etsy-scrape.rb
require 'etsy'
Etsy.api_key = '<api-key>'
shop = Etsy::Shop.find '<shop-name>'
out_dir = '<output-directory>'
Etsy.environment = :production
Dir.mkdir out_dir unless File.exists? out_dir
listings = []
@yufengwng
yufengwng / public_ip.txt
Created May 16, 2018
Get public IP address programmatically
View public_ip.txt
$ curl -si https://ipinfo.io
@yufengwng
yufengwng / doctl_zsh_completion.sh
Created Mar 29, 2017
ZSH completion file for doctl.
View doctl_zsh_completion.sh
# ZSH completion script for doctl.
#
# This takes bach completion and converts it to support zsh.
# Inspired by [kubectl][kc] and [opencompose][oc], the bash
# part is from [@andewsomething][as-gist].
#
# [kc]: https://github.com/kubernetes/kubernetes/blob/9dec47d/pkg/kubectl/cmd/completion.go
# [oc]: https://github.com/redhat-developer/opencompose/blob/master/pkg/cmd/completion.go
# [as-gist]: https://gist.github.com/andrewsomething/7ba993a7f7897936c6946ffed2f1edc6
View Effective_Engineer.md

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@yyx990803
yyx990803 / starcounter.js
Last active Jun 28, 2022
Count your total stars!
View starcounter.js
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
View GLSL-Noise.md

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@jsoverson
jsoverson / intercept.js
Created Feb 19, 2019
Intercept responses with chrome and puppeteer
View intercept.js
const puppeteer = require('puppeteer');
const prettier = require('prettier');
const atob = require('atob');
const btoa = require('btoa');
const scriptUrlPatterns = [
'*'
]
const requestCache = new Map();