Skip to content

Instantly share code, notes, and snippets.

View jbutko's full-sized avatar

Jozef Butko jbutko

View GitHub Profile
@marcoslhc
marcoslhc / .editorconfig
Created October 13, 2013 06:36
editorconfig for JS + HTML + CSS
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@derryspann
derryspann / Barrel Mixitup Url Filter
Created September 24, 2013 22:31
Using Barrel's MixitUp jquery filter to automatically filter based on url hash
$('#grid').mixitup({
onMixLoad: function(){
var hash = window.location.hash;
var noHash=hash.replace("#","");
if(hash){
$('#grid').mixitup('filter', noHash);
}
}
});
@jnwelzel
jnwelzel / search_form.scala.html
Created July 20, 2013 18:04
twitter bootstrap search form the way i like it
<div id="actions">
<form action="@link(0, "name")" method="GET" class="form-search">
<div class="input-append">
<input type="search" id="searchbox" name="f" value="@currentFilter" placeholder="Filter by device name..." class="input-medium search-query">
<button type="submit" id="device-search-submit" class="btn"><i class="icon-search"></i> Search</button>
</div>
</form>
</div>
@Integralist
Integralist / 1. Example Spec.js
Last active January 1, 2018 20:38
Mocking a Window object for unit-testing purposes
var mocks = {
resizeCalled: false,
createFakeWindow: function(width, height) {
var module = this;
return {
document: {
documentElement: {
clientWidth: width,
@chrislkeller
chrislkeller / import_json_appsscript.js
Last active June 16, 2025 11:34
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@dasher
dasher / litecoin.conf
Created December 22, 2012 18:13
example litecoin.conf
# litecoin.conf configuration file. Lines beginning with # are comments.
# Network-related settings:
# Run on the test network instead of the real litecoin network.
#testnet=0
# Connect via a socks4 proxy
#proxy=127.0.0.1:9050
@P4
P4 / default.reg
Last active March 3, 2025 14:09
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
@sqpierce
sqpierce / server.js
Created October 19, 2012 17:54
Simple node.js based logging server using express and Winston
// requirements
var winston = require('winston');
var MongoDB = require('winston-mongodb').MongoDB;
var express = require('express');
// set up winston
winston.add(MongoDB, {db:'winston'});
winston.remove(winston.transports.Console);
winston.emitErrs = true;
winston.handleExceptions(new winston.transports.File({ filename: 'exceptions.log' }))
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: