Skip to content

Instantly share code, notes, and snippets.

@btroncone
btroncone / rxjs_operators_by_example.md
Last active March 30, 2025 21:26
RxJS 5 Operators By Example
@Jimmy-Xu
Jimmy-Xu / shadowsocks_privoxy_tsocks.md
Last active April 29, 2022 15:00
shadowsocks+privoxy/tsocks

shadowsocks + privoxy/tsocks

  • shadowsocks: service, socks proxy
  • privoxy: service, convert socks proxy to http proxy
  • tsocks: tool, use socks proxy for any command line

Usage

tested under ubuntu14.04

@alexniver
alexniver / golang, ubuntu go get in china.md
Last active April 26, 2023 11:15
ubuntu下, 使用shadowsock和Privoxy帮助你在命令行中, 无障碍进行go get

#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.

相对来说shadowsock则灵活得多.

#解决方案 shadowsock + Privoxy

思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.

@paulirish
paulirish / what-forces-layout.md
Last active July 21, 2025 17:36
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 18, 2025 09:10
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

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);
@staltz
staltz / introrx.md
Last active July 22, 2025 08:36
The introduction to Reactive Programming you've been missing
@chenglou
chenglou / gist:40b75d820123a9ed53d8
Last active March 13, 2024 12:14
Thoughts on Animation

Interesting part (unmounting & API) is at the end if you're not interested in the rest =).

Stress Tests

This animation proposal is just an attempt. In case it doesn't work out, I've gathered a few examples that can test the power of a future animation system.

  1. Parent is an infinitely spinning ball, and has a child ball that is also spinning. Clicking on the parent causes child to reverse spinning direction. This tests the ability of the animation system to compose animation, not in the sense of applying multiple interpolations to one or more variables passed onto the child (this should be trivial), but in the sense that the parent's constantly updating at the same time as the child, and has to ensure that it passes the animation commands correctly to it. This also tests that we can still intercept these animations (the clicking) and immediately change their configuration instead of queueing them.

  2. Typing letters and let them fly in concurrently. This tests concurrency, coordination of an array of ch

@janosgyerik
janosgyerik / only-vim-can-do.md
Last active December 24, 2016 04:15
Things only Vim can do easily
  1. Works even under the most spartan conditions (in a simple remote shell window such as xterm, putty), with syntax highlighting, function folding, tabs, buffers, and all that lightning fast
  2. Delete lines matching pattern: g/pattern/d
  3. Delete lines not matching pattern: g!/pattern/d
  4. Sort buffer: :%sort
  5. Filter buffer through command :%!sort -u
  6. Delete from current line until end of file (try with a large file!)
  7. Increment numeric values: C-a, C-x
  8. Complete line pattern C-x C-l
  9. Convert a DOS file (with CRLF line endings) to UNIX: :set ff=unix (and then save it)
@hoppfrosch
hoppfrosch / WakeUp.ahk
Created January 6, 2014 12:26
AHK wake-up-timer #ahk #script #function
; AHK wake-up-timer
; scheduler provides some of the functions of Window's Task Scheduler or the command line tool "schtasks" as an AHK-script.
; Unlike Windows' Scheduled Tasks this function works with accounts without passwords
;
; Author: boskoop (http://http://www.autohotkey.com/board/topic/10587-wake-up-timer-scheduler-function)
; CONFIGURATION
Year=2006
Month=8 ;1-12
Day=30 ;1-31
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.