Skip to content

Instantly share code, notes, and snippets.

View brucellino's full-sized avatar
🌈
EGI

Bruce Becker brucellino

🌈
EGI
View GitHub Profile
require 'pp'
require 'httparty'
class PagerDuty
include HTTParty
format :json
def initialize(subdomain, api_token)
@options = {
:headers => {
"Authorization" => "Token token=#{api_token}",
@traylenator
traylenator / 25-stratum-zero-lbp.cern.ch.conf
Created November 6, 2013 12:22
Stratum 0 cvmfs configuration.
<VirtualHost *:80>
ServerName stratum-zero-lbp.cern.ch
## Vhost docroot
DocumentRoot /var/www/html
## Alias declarations for resources outside the DocumentRoot
Alias /opt/ams /srv/cvmfs2/ams/pub/catalogs
Alias /cvmfs/ams.cern.ch /srv/cvmfs2/ams/pub/catalogs
Alias /opt/atlas /srv/cvmfs2/atlas/pub/catalogs
Alias /opt/atlas-condb /srv/cvmfs/atlas-condb/pub/catalogs
@jwalton
jwalton / Github Milestone Dashing Widget.md
Last active July 30, 2020 23:17
Dashing Widget to Display Next Git Milestone

This will show your next GitHub milestone as a Dashing widget. Built on top of the Text widget.

To use:

  • Add the following to your gemfile:

  •   gem 'rest-client'
    
  • Replace the git_token, git_owner, and git_project in git-milestone.rb as appropriate.

@iamatypeofwalrus
iamatypeofwalrus / Bootsrap 3.0_in_Rails.md
Last active February 9, 2022 15:27
Add Bootstrap to your Rails app without a Gem

Bootstrap 3.0 in Rails without a Gem

What is Bootstrap?

It's a collection of CSS styles and Javascript add-ons that stop your site from looking like a shitty craigslist rip off from 1996. Seriously, who wants that?

Docs: CSS, Components, Javascript

Why Install It This Way?

Finding the right gem, keeping it updated, and learning the syntax is a pain in the ass. Why not install Bootstrap the way you'd install new javascript libraries?

[~]$ docker
Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted
[~]$
@sandys
sandys / table_to_csv.rb
Created October 18, 2012 10:04
convert a html table to CSV using ruby
# run using ```rvm jruby-1.6.7 do jruby "-J-Xmx2000m" "--1.9" tej.rb```
require 'rubygems'
require 'nokogiri'
require 'csv'
f = File.open("/tmp/preview.html")
doc = Nokogiri::HTML(f)
csv = CSV.open("/tmp/output.csv", 'w',{:col_sep => ",", :quote_char => '\'', :force_quotes => true})
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@erussell
erussell / trac2github.py
Created September 1, 2011 20:06
Import Trac tickets into GitHub issues, using v3 of the GitHub API. Based on https://github.com/adamcik/github-trac-ticket-import
#!/usr/bin/env python
import base64
import csv
import json
import urllib
import urllib2
import string
# Dictionary mapping Trac usernames to GitHub usernames