Skip to content

Instantly share code, notes, and snippets.

View taozhi8833998's full-sized avatar
🐬
Focusing

taozhi taozhi8833998

🐬
Focusing
View GitHub Profile
@kudarisenmon
kudarisenmon / gdal2tiles.patch
Created July 12, 2016 11:32
「ERROR 6: EPSG PCS/GCS code 900913 not found in EPSG support files.」を回避するパッチ
--- /usr/bin/gdal2tiles.py 2014-04-05 23:21:17.000000000 +0900
+++ /home/kudarisenmon/bin/gdal2tiles.py 2016-07-09 18:08:34.012957232 +0900
@@ -783,7 +783,7 @@
self.out_srs = osr.SpatialReference()
if self.options.profile == 'mercator':
- self.out_srs.ImportFromEPSG(900913)
+ self.out_srs.ImportFromEPSG(3857)
elif self.options.profile == 'geodetic':
self.out_srs.ImportFromEPSG(4326)
@chmanie
chmanie / wthr.fish
Last active November 29, 2017 01:23
Get your local weather (in the command line!)
# Weather!
# uses https://github.com/alexreisner/geocoder
# and https://github.com/robmathers/WhereAmI
function wthr
set LOC (whereami)
set LAT (echo $LOC | cut -d" " -f2)
set LON (echo $LOC | cut -d" " -f4)
set CITY (geocode -s nominatim "$LAT,$LON" | grep -Eo '^City(.+)' | cut -d: -f2 | xargs | tr ' ' '-')
curl -4 http://wttr\.in/$CITY
end
@miharekar
miharekar / README.md
Last active December 9, 2020 08:36
Don't Screw Up When You SSH To Production
@paulirish
paulirish / what-forces-layout.md
Last active November 27, 2025 13:56
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
var Bar1 = base => class extends base {
componentWillMount(){
super.componentWillMount();
console.log('Bar1');
}
};
var Bar2 = base => class extends base {
componentWillMount(){
super.componentWillMount();
@binarymax
binarymax / Bitmap.js
Last active January 22, 2025 13:42
Javascript bitmap data structure
//------------------------------------------
//Compact bitmap datastructure
//Memory efficient array of bool flags
var Bitmap = function(size){
this._cols = 8;
this._shift = 3;
this._rows = (size>>this._shift)+1;
this._buf = new ArrayBuffer(this._rows);
this._bin = new Uint8Array(this._buf);
};
@honkskillet
honkskillet / byte-sizetuts.md
Last active August 22, 2024 14:19
A series of golang tutorials with youtube videos.
@clhenrick
clhenrick / README.md
Last active March 3, 2025 23:02
PostgreSQL & PostGIS cheatsheet (a work in progress)
@jonlabelle
jonlabelle / regular_expression_cheatsheet.md
Last active August 1, 2025 02:27
Regular Expression Cheatsheet

Regular Expression Cheatsheet

Anchors

^   Matches at the start of string or start of line if multi-line mode is
	enabled. Many regex implementations have multi-line mode enabled by
	default.

$ Matches at the end of string or end of line if multi-line mode is enabled.
@marianposaceanu
marianposaceanu / linux_fun.md
Last active March 16, 2025 22:31
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!