Skip to content

Instantly share code, notes, and snippets.

{"borderRadius":4,"colors":{"primary":"#2684FF","primary75":"#4C9AFF","primary50":"#B2D4FF","primary25":"#DEEBFF","danger":"#DE350B","dangerLight":"#FFBDAD","neutral0":"hsl(0, 0%, 100%)","neutral5":"hsl(0, 0%, 95%)","neutral10":"hsl(0, 0%, 90%)","neutral20":"hsl(0, 0%, 80%)","neutral30":"hsl(0, 0%, 70%)","neutral40":"hsl(0, 0%, 60%)","neutral50":"hsl(0, 0%, 50%)","neutral60":"hsl(0, 0%, 40%)","neutral70":"hsl(0, 0%, 30%)","neutral80":"hsl(0, 0%, 20%)","neutral90":"hsl(0, 0%, 10%)"},"spacing":{"baseUnit":4,"controlHeight":38,"menuGutter":8}}
@broncha
broncha / invite.js
Last active August 29, 2015 14:21
Invite all friends at once
var f = document.getElementsByClassName("fbProfileBrowserListItem"); for(var i = 0; i < f.length; i++){ var _b = f.item(i).getElementsByClassName("uiButton"); if(_b.length) _b[0].click(); }
@broncha
broncha / assetic dumper
Created February 6, 2015 10:44
assetic dumper
$assetFactory = new AssetFactory($themePath);
$assetFactory->setDebug(false);
$fm = new FilterManager();
$fm->set('cssrewrite', new CssRewriteFilter());
$assetFactory->setFilterManager($fm);
$am = new LazyAssetManager($assetFactory);
@broncha
broncha / prototype.html.twig
Last active August 29, 2015 14:13
Symfony prototype rendering macro
{% macro widget_prototype(widget, remove_text) %}
{% if widget.vars.prototype %}
{% set form = widget.vars.prototype %}
{% set name = widget.vars.name %}
{% else %}
{% set form = widget %}
{% set name = widget.vars.full_name %}
{% endif %}
<div data-content="{{ name }}">
//TODO in this script
//1. Add board id in url used in TrelloAPI method (line xx
//2. Add your email in sendChartsByEmail
//3. Add your Trello keys from https://trello.com/1/appKey/generate to authorizeTrello
//4. Setup daily trigger in script editor that runs TrelloAPI()
//5. Run once in google apps script editor to authorize trello for access
//6. Lookup values and aggValues are hardcoded to the labels I use in Trello
//
//In the Trello board use scrum for trello syntax (http://scrumfortrello.com/)
//Example title: <name of task> (estimate hours) [work delivered in hours]
@broncha
broncha / syncedmulti.js
Created May 4, 2013 16:55
Synced multiselect with jQuery multiselect and sheepit
<script type="text/javascript">
Array.prototype.removeItem = function(val){
var index = this.indexOf(val);
if(index > -1) this.splice(index,1);
}
$(document).ready(function() {
var selc = [];
var sheepItForm = $('#sheepItForm').sheepIt({
separator: '',
allowRemoveLast: false,
#!/bin/bash
# Installer for GitLab on RHEL 5 (Red Hat Enterprise Linux and CentOS)
# mattias.ohlsson@inprose.com
#
# Only run this on a clean machine. I take no responsibility for anything.
#
# Submit issues here: github.com/mattias-ohlsson/gitlab-installer
# Exit on error
#set -e
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
frontend all 0.0.0.0:80 accept-proxy
timeout client 5000
default_backend www_backend
@broncha
broncha / nodetail
Created March 28, 2012 18:44
pseudo tail in nodejs
var fs = require('fs');
var lastSize = 139658900;
var timer = setInterval(function(){
fs.stat("E:/wamp/logs/access.log",function(err,stats){
if(stats.size > lastSize){
var buf = fs.createReadStream("E:/wamp/logs/access.log",{start:lastSize,end:stats.size});
buf.setEncoding('utf8');
buf.on('data',function(data){
@broncha
broncha / x
Created January 15, 2009 21:17
/*
=skin=
@name Custom
@author You
@homepage http://www.yourpage.com
@email broncha.rajesh@gmail.com
@license MPL/LGPL/GPL
=/skin=