Skip to content

Instantly share code, notes, and snippets.

@sethamclean
sethamclean / walk generator
Created March 10, 2014 22:21
filepath.walk go routine generator
package main
import (
"path/filepath"
"fmt"
"os"
)
func main(){
location := "../gocode/"
@itsjavi
itsjavi / jquery.skrollto.js
Created March 21, 2014 10:02
Soft scroll to an element
$.fn.skrollto = function(speed, easing) {
speed = speed ||  1000;
easing = easing || 'swing';
return $(this).each(function(i, el){
//calculate destination place
var dest = 0;
var el = $(this);
if (el.is(':hidden')) {
@rufhausen
rufhausen / Slack.php
Last active October 25, 2021 14:10
A simple class for sending a message to SlackHQ https://slack.com. Config settings in this example are coming from Laravel's Config facade. Requires Guzzle 4.x http://guzzlephp.org.
<?php
//This code is licensed under the terms of the MIT license
use GuzzleHttp\Client;
use Config; //using Laravel's Config facade
/*
|--------------------------------------------------------------------------
@itsjavi
itsjavi / bootstrap-equal-height.css
Created June 10, 2014 16:12
Bootstrap 3 responsive equal height columns
/* From: http://www.minimit.com/articles/solutions-tutorials/bootstrap-3-responsive-columns-of-same-height */
/* columns of same height styles */
.container-xs-height {
display:table;
padding-left:0px;
padding-right:0px;
}
.row-xs-height {
display:table-row;
@jagwire
jagwire / gist:0129d50778c8b4462b68
Created December 11, 2014 15:12
Unity command line script to build WebGL player
//place this script in the Editor folder within Assets.
using UnityEditor;
//to be used on the command line:
//$ Unity -quit -batchmode -executeMethod WebGLBuilder.build
class WebGLBuilder {
static void build() {
string[] scenes = {"Assets/main.unity"};
@paulirish
paulirish / bling.js
Last active September 13, 2025 12:13
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@itsjavi
itsjavi / scriptloader.js
Last active January 25, 2023 13:07
JS ScriptLoader using ES6 Promises
/*!
* ES6 ScriptLoader snippet
* (c) Javier Aguilar mjolnic.com
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
* Source: https://gist.github.com/mjolnic/93cc837dd2213ec0636a
*/
window.ScriptLoader = function () {
/**
*
* @param {string} url
@vinzenz
vinzenz / dial-mysql-via-ssh.go
Created November 7, 2016 10:27
Using MySQL / MariaDB via SSH in Golang
package main
import (
"database/sql"
"fmt"
"net"
"os"
"github.com/go-sql-driver/mysql"
"golang.org/x/crypto/ssh"
@joyrexus
joyrexus / README.md
Last active June 12, 2025 20:55
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 15, 2025 03:46
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example