Skip to content

Instantly share code, notes, and snippets.

View lazypower's full-sized avatar
💭
Bring back independent blogs, rss feeds, and the small web.

Charles "Chuck" Butler lazypower

💭
Bring back independent blogs, rss feeds, and the small web.
View GitHub Profile
@lazypower
lazypower / gist:2136059
Created March 20, 2012 14:18 — forked from mikebosco/gist:2136049
DeterminePath degrees join fails it
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dev.Data;
namespace UBoundTools.Database.LMP
{
public class DeterminePath
{
(android)
(areyoukiddingme)
(arrington)
(awyeah)
(basket)
(beer)
(bunny)
(bumble)
(cadbury)
(cake)
@lazypower
lazypower / youtrack_comment_icons.user.js
Created August 22, 2012 14:18 — forked from dustyburwell/youtrack_comment_icons.user.js
YouTrack comment icons user script
// Copyright (c) 2012, Dusty Burwell
//
// ==UserScript==
// @name Emoticons for YouTrack
// @namespace http://dustyburwell.github.com
// @description Converts text to emoticons in YouTrack.
// @include http://youtrack/*
// @include https://youtrack/*
// ==/UserScript==
# by default you only get 1000 objects at a time
# so you have to roll your own cursor
S3.connect!
objects = []
last_key = nil
begin
new_objects = AWS::S3::Bucket.objects(bucket_name, :marker => last_key)
objects += new_objects
def export_inverts
require 'fastercsv'
inverts = Invert.all
filename = params[:action] + ".csv"
#this is required if you want this to work with IE
if request.env['HTTP_USER_AGENT'] =~ /msie/i
headers['Pragma'] = 'public'
headers["Content-type"] = "text/plain"
headers['Cache-Control'] = 'no-cache, must-revalidate, post-check=0, pre-check=0'
# Run with bash < <( curl https://gist.github.com/raw/786735/bootstrap-chef-client-osx.sh )
# Switch to system Ruby
if [ -s "$HOME/.rvm/scripts/rvm" ]; then
rvm use system
fi
sudo gem install chef --no-ri --no-rdoc
sudo mkdir -p /etc/chef
sudo scp [email protected]:/etc/chef/validation.pem /etc/chef/validation.pem
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libffi-dev
apt-get -y install autoconf curl git-core bzip2
apt-get -y autoremove
apt-get -y clean
cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
tar -xvzf ruby-2.0.0-p247.tar.gz
#!/bin/bash
path=${1%/}
user=${2}
group="www-data"
help="nHelp: This script is used to fix permissions of a drupal installationnyou need to provide the following arguments:nt 1) Path to your drupal installationnt 2) Username of the user that you want to give files/directories ownershipnNote: "www-data" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this scriptnnUsage: (sudo) bash ${0##*/} drupal_path user_namen"
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then
echo "Please provide a valid drupal path"
echo -e $help
alias sb_start="sudo start starbound"
alias sb_stop="sudo stop starbound"
alias sb_restart="sb_stop;sb_start"
alias sb_update="sudo /home/ribesg/sb_update"
alias sb_online="netstat -nt | grep -c 21025"
alias sb_status="sudo status starbound"
#!/bin/bash
set -eux
# This script collects all the charms we are trying to get running on power.
# Theh first parameter is the base directory destination.
if [[ -z "$1" ]]; then
cd $1
fi
# Power only supports trusty.