Skip to content

Instantly share code, notes, and snippets.

@neocotic
neocotic / ini.bat
Last active January 19, 2021 20:20
INI File Utilities
:: INI File Utilities
::
:: Copyright 2011, [neocotic](http://github.com/neocotic)
:: Released under the MIT License
:: http://en.wikipedia.org/wiki/MIT_License
@echo off
setLocal enableDelayedExpansion
:: Declares required constants
@neocotic
neocotic / timediff.bat
Last active January 19, 2021 20:20
Time Difference Calculator
:: Time Difference Calculator
::
:: Copyright 2011, [neocotic](http://github.com/neocotic)
:: Released under the MIT License
:: http://en.wikipedia.org/wiki/MIT_License
@echo off
setLocal enableDelayedExpansion
:: To be returned when script ends
@neocotic
neocotic / padEven.js
Last active January 19, 2021 20:19
JavaScript simply even padding
// JavaScript padEven
// (c) 2011 [neocotic](http://github.com/neocotic)
// Released under the MIT License
// http://en.wikipedia.org/wiki/MIT_License
function padEven(str, delim, maxLineLen) {
delim = delim || ',';
maxLineLen = maxLineLen || 80;
str = str || '';
var
arr = [],
@neocotic
neocotic / jsonp.js
Last active January 19, 2021 20:19
Simple JSONP support
// Simple JSONP support
// (c) 2011 [neocotic](http://github.com/neocotic)
// Released under the MIT License
// http://en.wikipedia.org/wiki/MIT_License
(function (root) {
var previousJSONP = root.JSONP;
root.JSONP = {
__callbacks : {},
get : function (url, callback, context) {
var
@neocotic
neocotic / analytics.coffee
Last active January 19, 2021 20:18
Google Chrome extension helpers
# (c) 2012 [neocotic](http://github.com/neocotic)
# Freely distributable under the MIT license.
# Private constants
# -----------------
# Code for extension's analytics account.
ACCOUNT = 'UA-12345678-1'
# Source URL of the analytics script.
SOURCE = 'https://ssl.google-analytics.com/ga.js'
@neocotic
neocotic / jquery.html5events.js
Created February 6, 2014 14:25
jQuery HTML5 Event Delegation Support
(function ($) {
var html5Events = [
'afterprint',
'beforeprint',
'canplay',
'canplaythrough',
'contextmenu',
'drag',
'dragend',
@neocotic
neocotic / .bashrc
Last active August 3, 2017 08:43
Personal Bash Prompt
# Override bash prompt depending on colors being enabled and if you are root
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
if [ $(id -u) -eq 0 ]; then
PS1=$'\u@\h:\W\[$(tput setaf 2)\]$(__git_ps1 " (%s)")\[$(tput sgr0)\] \[$(tput setaf 1)\]\xCE\xBB\[$(tput sgr0)\] '
else
PS1=$'\u@\h:\W\[$(tput setaf 2)\]$(__git_ps1 " (%s)")\[$(tput sgr0)\] \xCE\xBB '
fi
fi
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neocotic
neocotic / keybase.md
Created July 11, 2017 23:45
keybase.md

Keybase proof

I hereby claim:

  • I am neocotic on github.
  • I am neocotic (https://keybase.io/neocotic) on keybase.
  • I have a public key ASCBnPGu0RSGV7iC9E2ys512JVeY1l19TBuJZK2z_awG0go

To claim this, I am signing this object:

@neocotic
neocotic / game-boy-wallpaper-blue.svg
Last active November 7, 2017 10:06
Game Boy Wallpapers
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.