Skip to content

Instantly share code, notes, and snippets.

View zsitro's full-sized avatar

Gábor Zsótér zsitro

View GitHub Profile
@zsitro
zsitro / us_states_bounds.json
Created December 8, 2019 16:38
US States Bounds in JSON
{
"AL":{ "south_west":{"lat":-88.473227, "lng": 30.223334}, "north_east": { "lat": -84.88908, "lng": 35.008028} },
"AK":{ "south_west":{"lat":-179.148909, "lng": 51.214183}, "north_east": { "lat": 179.77847, "lng": 71.365162} },
"AS":{ "south_west":{"lat":-171.089874, "lng": -14.548699}, "north_east": { "lat": -168.1433, "lng": -11.046934} },
"AZ":{ "south_west":{"lat":-114.81651, "lng": 31.332177}, "north_east": { "lat": -109.045223, "lng": 37.00426} },
"AR":{ "south_west":{"lat":-94.617919, "lng": 33.004106}, "north_east": { "lat": -89.644395, "lng": 36.4996} },
"CA":{ "south_west":{"lat":-124.409591, "lng": 32.534156}, "north_east": { "lat": -114.131211, "lng": 42.009518} },
"CO":{ "south_west":{"lat":-109.060253, "lng": 36.992426}, "north_east": { "lat": -102.041524, "lng": 41.003444} },
"MP":{ "south_west":{"lat":144.886331, "lng": 14.110472}, "north_east": { "lat": 146.064818, "lng": 20.553802} },
"CT":{ "south_west":{"lat":-73.727775, "lng": 40.980144}, "north_east": { "lat": -71.786994, "lng": 42.0505
@zsitro
zsitro / generator_config.txt
Created September 15, 2015 14:16
Fontsquirrel Font-face generation
# Font Squirrel Font-face Generator Configuration File
# Upload this file to the generator to recreate the settings
# you used to create these fonts.
{"mode":"expert","formats":["ttf","woff","woff2","eotz","svg"],"tt_instructor":"keep","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback_custom":"100","fallback":"times","options_subset":"advanced","subset_range":["dutch","english","french","german","hungarian"],"subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"}
@zsitro
zsitro / .bash
Created August 18, 2015 11:26
Terminal things
top -o vsize `monitor`
!! `run last command`
!word `run last command with beginning of "word"`
!word:p `lis last commands with beginning of "word"`
say -v whisper "whispering voice from macbook"
@zsitro
zsitro / file.less
Created August 10, 2015 07:53
LESS requirement
// -----------------------------
// BAD EXAMPLE:
// style.less
.gallery{
margin-top: 2rem;
}
// responsive.less
@media (max-width: 767px) {
@zsitro
zsitro / Laravel.md
Last active August 29, 2015 14:22
Laravel things

Redirects & routes

{{route('auth.select_user_type', 'customer')}}
return Redirect::route('login');
return Redirect::to('user/login');

Blade

require('./content.js')
console.log("entry.")
# 1.bundle.js
require.ensure ["./input.coffee", "./module-b.coffee"], (require) ->
a = require("./module-b.coffee");
# 2.bundle.js
require.ensure ["./input-2.coffee", "./module-c.coffee", "./module-b.coffee"], (require) ->
@zsitro
zsitro / steps.md
Created October 1, 2014 07:37
Optimize w/ refactoring

vendor.js is ~1.6MB, loads in ~195ms

##Step 1

	.pipe(plugins.rename('vendor.js'))
+	.pipe(plugins.uglify())
	.pipe(gulp.dest('./dist/scripts'));
@zsitro
zsitro / logo.html
Created July 8, 2014 08:31
Module:Logo
<div class="m-logo">
<a href="/" title="site_title - slogan">
<img src="logo.png">
</a>
<h1>site_title</h1>
</div>
@zsitro
zsitro / notes.md
Last active November 29, 2017 08:35
Git things

Remove all deleted files from index when commit changes

git add -u

Add everything to a commit (also deletes)

This is most useful when your terminal is not in the root and you don't want to change dir just to commit

git add :/ -u
@zsitro
zsitro / universal-module-definition.js
Last active August 29, 2015 13:57
Universal Module Definition
(function (root, factory) {
if (typeof exports === 'object') {
// CommonJS
module.exports = factory(require('b'));
} else if (typeof define === 'function' && define.amd) {
// AMD
define(['b'], function (b) {
return (root.returnExportsGlobal = factory(b));
});
} else {