Skip to content

Instantly share code, notes, and snippets.

View jkrall's full-sized avatar

Joshua Krall jkrall

View GitHub Profile
@omerlh
omerlh / daemonset.yaml
Last active April 20, 2023 08:50
A daemonset that print the most heavy files on each node
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disk-checker
labels:
app: disk-checker
spec:
selector:
matchLabels:
app: disk-checker
@willurd
willurd / web-servers.md
Last active April 18, 2024 09:41
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@RandomEtc
RandomEtc / 1-make-key
Created September 16, 2011 16:35
generating SSL keys and Certificate Signing Requests for Heroku / Nginx / RapidSSL
Key was generated using:
tom% openssl genrsa -des3 -out example.com.key 2048
Generating RSA private key, 2048 bit long modulus
....+++
..........................................................................................................................+++
e is 65537 (0x10001)
Enter pass phrase for example.com.key:
Verifying - Enter pass phrase for example.com.key:
%tom
@mhorbul
mhorbul / vagrant-centos-5.5.-postinstall.sh
Created March 29, 2011 22:55
postinstall.sh script for building CentOS 5.5 vagrant box with RVM
rpm -Uvh --force --nosignature --nodigest http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh --force --nosignature --nodigest http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
yum install -y curl ftp rsync sudo time wget which git-core
yum install -y gcc bzip2 make kernel-devel-`uname -r`
yum install -y gcc-c++ zlib-devel openssl-devel readline-devel
yum erase -y wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
service vboxadd status 2>&1 >> /dev/null
if [ $? -eq 1 ]; then
@tehmaze
tehmaze / google-chrome.sh
Created December 30, 2010 22:34
Google Chrome Profile launcher for OSX
#! /bin/bash
#
# Put this script in ~/bin/google-chrome for example, then create
# a symlink to start using it, for example:
#
# shell% cd bin
# shell% ln -s google-chrome google-chrome-test
# shell% ./google-chrome-test
# Try to locate Google Chrome
@mislav
mislav / hoptoad_api.rb
Created April 22, 2010 22:59 — forked from croaky/hoptoad_api.rb
Active Resource model for Hoptoad
require 'active_resource'
ActiveResource::Base.class_eval do
private
alias original_find_or_create_resource_for find_or_create_resource_for
# names like "foo.bar" become "foo_bar" so constants lookup doesn't barf
def find_or_create_resource_for(name)
original_find_or_create_resource_for name.to_s.gsub('.', '_')
# Pipe Ars Technica's live Apple event coverage into a Campfire room.
# http://arstechnica.com/apple/news/2010/01/tablet-live-event-liveblog.ars
#
# Usage:
# $ gem install -r hpricot tinder
# $ ruby -rubygems ars_live.rb -ssl mysubdomain myroomid myapikey
require "hpricot"
require "open-uri"
require "tinder"
require File.dirname(__FILE__) + '/spec_helper'
describe "The library itself" do
Spec::Matchers.define :have_no_tab_characters do
match do |filename|
@failing_lines = []
File.readlines(filename).each_with_index do |line,number|
@failing_lines << number + 1 if line =~ /\t/
end
@failing_lines.empty?
@croaky
croaky / hoptoad_api.rb
Created July 30, 2008 22:20
Access the Hoptoad (http://hoptoadapp.com) API with Ruby's ActiveResource
# tests at http://gist.github.com/3354
class Hoptoad < ActiveResource::Base
self.site = "http://your_account.hoptoadapp.com"
class << self
@@auth_token = 'your_auth_token'
def find(*arguments)
arguments = append_auth_token_to_params(*arguments)