Skip to content

Instantly share code, notes, and snippets.

View brucellino's full-sized avatar
🌈
EGI

Bruce Becker brucellino

🌈
EGI
View GitHub Profile
@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
@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
require 'pp'
require 'httparty'
class PagerDuty
include HTTParty
format :json
def initialize(subdomain, api_token)
@options = {
:headers => {
"Authorization" => "Token token=#{api_token}",
[~]$ docker
Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted
[~]$
@ryansch
ryansch / tar.rb
Created June 16, 2016 12:17
Create/Extract a tarball from ruby
require 'find'
require 'archive/tar/minitar'
module IdiomaticTar
def create_tarball(filename:, directory:)
base_dir = Pathname.new(directory).parent
FileUtils.cd(base_dir) do
Pathname.new(filename).open('wb') do |tarball|
Zlib::GzipWriter.wrap(tarball) do |gz|
Archive::Tar::Minitar::Output.open(gz) do |tar|
@seignovert
seignovert / README.md
Last active February 21, 2019 20:08
[Zenodo] Add ORCID badge

Add ORCID badge to Zenodo publication

No longer required since Oct-2017. Now ORCID can be added directly under the Authors section of the metadata on the deposit web interface.

Create your personal access token

In order to access the API you need to create a personal token. To do that you need to:

  1. Go to Home > Account > Applications and + New token in the Personal access tokens section.
  2. Provide a name for the token to find it later
@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.

@krisadm315
krisadm315 / README.md
Created July 28, 2020 01:52 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@bot11
bot11 / install_java_from_source.txt
Created April 4, 2015 02:12
Install java from source
Download java from this link:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Alternatively , wget as below:
wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
sudo mv jdk-7u51-linux-x64.tar.gz /usr/lib/jvm [create if /usr/lib/jvm not present, can be put in /usr/local also.]
sudo tar zxvf jdk-7u51-linux-x64.tar.gz
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_51/bin/javac 1
@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?