Skip to content

Instantly share code, notes, and snippets.

View ialpert's full-sized avatar

1G0R Alpert ialpert

View GitHub Profile
@ctechols
ctechols / compinit.zsh
Last active June 29, 2024 16:18
Speed up zsh compinit by only checking cache once a day.
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
autoload -Uz compinit
@edenfall
edenfall / js-array-sort.js
Last active March 4, 2024 08:59
Implements selection, bubble, insertion, quick and heap sort algorythms in Array prototype
/*
(c) 2010~2013 Alessandro Ramos dos Santos
edenfall@gmail.com
This file implements selection, bubble, insertion, quick and heap sort algorythms in Array prototype.
It adds a swap() method for use with these algorythms.
Hope you like it. :)
Forgive my bad English. :(
@GothAck
GothAck / index.js
Created March 20, 2012 18:33
Parsing BIG compressed XML data (OpenStreetMap) with Node.js
#!/usr/bin/env node
/*
* Parsing BIG compressed data with Node.js and SAX
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2
* Greg Miell 2012
*/
// Simple string trim prototype extension
String.prototype.trim = function() {
@alexshk
alexshk / gist:1234559
Created September 22, 2011 11:17
.osx
# Show indicator lights for open applications in the Dock
defaults write com.apple.Dock show-process-indicators -bool true
# Don’t animate opening applications from the Dock
defaults write com.apple.Dock launchanim -bool false
# Expand save panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default