Skip to content

Instantly share code, notes, and snippets.

View xoebus's full-sized avatar
🤖
beep beep

Christopher Brown xoebus

🤖
beep beep
  • San Francisco, CA
View GitHub Profile
@xoebus
xoebus / nibble.rb
Last active July 30, 2023 11:18
Some code to grab Minecraft codes off reddit.
require 'nibbler'
require 'open-uri'
CODE_RE = /[A-Za-z1-9]{4}-[A-Za-z1-9]{4}-[A-Za-z1-9]{4}/
class String
[:gray, :red, :green, :yellow, :blue, :purple, :cyan, :white].each_with_index do |color, i|
define_method color do "\033[1;#{30+i}m#{self}\033[0m" end
define_method :"#{color}ish" do "\033[0;#{30+i}m#{self}\033[0m" end
end
@xoebus
xoebus / git
Created April 24, 2010 16:39
Git Cheat Output for a blog post.
git:
Setup
-----
git clone <repo>
clone the repository specified by <repo>; this is similar to "checkout" in
some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
@xoebus
xoebus / rate.go
Created January 10, 2018 19:41
Go Rate-limit Example
package main
import (
"context"
"fmt"
"time"
"golang.org/x/time/rate"
)
@xoebus
xoebus / README.md
Last active October 21, 2017 06:41
Send iMessages from the Command Line

imsg

Send iMessages from the Command Line


Install

Just run the following in your shell:

@xoebus
xoebus / convert_to_bazel.rb
Last active May 3, 2017 06:31
a script to convert dep files to bazel
require 'toml'
def standard_name(name)
parts = name.split("/", 2)
domain = parts[0].split(".").reverse.join("_")
path = parts[1].split("/").join("_")
"#{domain}_#{path}".gsub("-", "_").gsub(".", "_")
end
@xoebus
xoebus / libgit2.rb
Created April 27, 2017 19:00
libgit2 v0.24.6
class Libgit2 < Formula
desc "C library of Git core methods that is re-entrant and linkable"
homepage "https://libgit2.github.com/"
url "https://github.com/libgit2/libgit2/archive/v0.24.6.tar.gz"
sha256 "7b441a96967ff525e790f8b66859faba5c6be4c347124011f536ae9075ebc30c"
head "https://github.com/libgit2/libgit2.git"
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "libssh2" => :recommended
boop
platform: linux
params:
A: hello
B: goodbye
run:
path: /bin/sh
args:
- -c
// Pipeline CSS
section.pipe {
display: none;
}
bosh_q9qlsff59@c08689bb-b559-41be-878c-77c0c4142497:~$ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16011 errors:0 dropped:0 overruns:0 frame:0
TX packets:16011 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3830284 (3.8 MB) TX bytes:3830284 (3.8 MB)