Skip to content

Instantly share code, notes, and snippets.

View zbee's full-sized avatar
👾

Ethan Henderson zbee

👾
View GitHub Profile
@jakebellacera
jakebellacera / ICS.php
Last active April 19, 2024 09:06
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@signed0
signed0 / gist:2031157
Created March 13, 2012 19:53
Google Polyline encoder & decoder
'''Provides utility functions for encoding and decoding linestrings using the
Google encoded polyline algorithm.
'''
def encode_coords(coords):
'''Encodes a polyline using Google's polyline algorithm
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html
for more information.
@avdg
avdg / gist:2210109
Created March 26, 2012 22:03
Bootstrap popover triggered by hover, fading away in few seconds
var tmp = null;
$('###selector###').popover({
trigger: 'manual',
title: 'testing',
delay: {show:500, hide:100}
});
$('###selector###').hover(function(){
clearTimeout(tmp);
@nijikokun
nijikokun / example-user.js
Created May 3, 2012 20:46
Beautiful Validation... Why have I never thought of this before?!
var user = {
validateCredentials: function (username, password) {
return (
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' }
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' }
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' }
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' }
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' }
: false
);
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@nickbudi
nickbudi / README.md
Last active February 17, 2024 14:25
Budi's Counter-Strike: Global Offensive config

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config. Changelogs can be found under revisions here

Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

After the Wild West Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg

Launch Options

@GonchuB
GonchuB / keysToLowerCase.js
Created March 19, 2014 14:57
convert json keys to lowercase recursively.
/**
* Created by gonchub on 19/03/14.
*/
function keysToLowerCase(obj) {
if (!typeof(obj) === "object" || typeof(obj) === "string" || typeof(obj) === "number" || typeof(obj) === "boolean") {
return obj;
}
var keys = Object.keys(obj);
var n = keys.length;
var lowKey;
@stephanetimmermans
stephanetimmermans / ubuntu-compass-ruby
Last active July 4, 2019 12:48
Install Compass+Ruby on Ubuntu 14.04
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@zekesonxx
zekesonxx / linkfilterbypass.user.js
Last active November 5, 2021 10:04
Steam Link Filter Bypasser
// ==UserScript==
// @name Steam Link Filter Bypass
// @author Zeke Sonxx
// @namespace zekesonxx
// @version 0.2
// @description Bypasses the Steam link filter
// @match https://steamcommunity.com/linkfilter/*
// @include https://steamcommunity.com/linkfilter/*
// @copyright 2014, Zeke Sonxx, MIT Licensed
// ==/UserScript==
@zbee
zbee / _iso8601.md
Last active March 13, 2016 16:32
How to do ISO 8601 in various languages (2015-01-14T20:55).