Skip to content

Instantly share code, notes, and snippets.

@lustremedia
lustremedia / bootstrap.min.css
Last active December 30, 2015 16:08
newspaper hmtl and css
/*!
* Bootstrap v3.0.3
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@lustremedia
lustremedia / tint2-default-cb
Created January 21, 2014 20:33
Default tint2 config from CrunchBang Waldorf
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/
# Background definitions
var vol = 20;
var t = 0;
function playSample(id) {
$("#player").stop();
vol = 20;
stopSample();
$("#player").setFile("yourfile.mp3");
fadeIn();
[alias]
co = checkout
br = branch
ci = commit
st = status
deploytag = "!git tag deploy-`date \"+%Y%m%d%H%M\"` && git push --tags"
switch = !legit switch \"$@\"
branches = !legit branches
sprout = !legit sprout \"$@\"
unpublish = !legit unpublish \"$@\"
@lustremedia
lustremedia / jquery plugin starter
Last active June 17, 2023 13:28
jquery plugin starter
// jQuery Plugin Boilerplate
// A boilerplate for jumpstarting jQuery plugins development
// version 1.1, May 14th, 2011
// by Stefan Gabos
// remember to change every instance of "pluginName" to the name of your plugin!
(function($) {
// here we go!
$.pluginName = function(element, options) {
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){
if (document.querySelectorAll) {
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
$('.jp-volume-bar').mousedown(function() {
var parentOffset = $(this).offset(),
width = $(this).width();
$(window).mousemove(function(e) {
var x = e.pageX - parentOffset.left,
volume = x/width
if (volume > 1) {
$("#JPID").jPlayer("volume", 1);
} else if (volume <= 0) {
$("#JPID").jPlayer("mute");
@lustremedia
lustremedia / PagesController.rb
Last active August 29, 2015 14:01
render/redirect_to with flash messages and validation errors in rails 4
class PagesController < ApplicationController
def contact
if request.post? #POST
logger.info("I am a POST")
@entrant=Entrant.new(entrant_params)
@event = Event.find(1)