Skip to content

Instantly share code, notes, and snippets.

View neenaoffline's full-sized avatar

Ravi Chandra Padmala neenaoffline

View GitHub Profile
OkHttpSender sender = OkHttpSender.create("http://localhost:9411/api/v1/spans");
sender.check();
Brave brave = new Brave.Builder()
.reporter(AsyncReporter.builder(sender)
.build(Encoder.JSON))
.build();
BraveExecutorService tracePropagatingExecutor = new BraveExecutorService(
new Dispatcher().executorService(),
brave.serverSpanThreadBinder()
@neenaoffline
neenaoffline / systemd.md
Last active May 25, 2016 11:48
Creating Systemd services

Creating a Systemd service

Systemd unit files are resources that Systemd recognizes and operates on. There are several types of unit files, two of which are immediately relevant to us:

  1. .service files describe how you can start/stop a service (amongst other things)
  2. .target files function similar to how run levels do. They act as synchronization points when booting up or changing states

Below is a simple fancy-pants.service file that will start the fancy-pants app.

@neenaoffline
neenaoffline / git_commit_template_setup.sh
Last active March 14, 2016 06:57 — forked from neeharv/git_commit_template_setup.sh
Setup simple git commit message template
wget -O ~/.git_commit_message.txt https://gist.githubusercontent.com/neeharv/7b2e074d9773ab5815fa/raw/caf23132755aa9c9f965d1cd726e02b7d76b8000/.git_commit_message.txt \
& git config --global commit.template ~/.git_commit_message.txt
@neenaoffline
neenaoffline / trial.clj
Last active January 13, 2016 20:37 — forked from anonymous/trial.clj
(defn trial []
(->> (cheshire/parse-string (:body (lf/get-restaurants)) true)
:restaurants
(reduce (fn [acc {:keys [name]}] (conj name)) [])
(res/response)))
@neenaoffline
neenaoffline / fabfile.py
Last active October 28, 2015 13:19
quick tcpdump across hosts
from fabric.api import env, sudo, get, parallel
@parallel
def tcpdump():
sudo("timeout --preserve-status 10s tcpdump -w fabric.tcpdump")
@parallel
def get_dumps():
get("fabric.tcpdump", "%s.fabric.tcpdump" % env.host)
diff --git a/clydelib/aur.lua b/clydelib/aur.lua
index 3b33529..81b98d9 100644
--- a/clydelib/aur.lua
+++ b/clydelib/aur.lua
@@ -15,6 +15,7 @@ function download(host, file, user)
lfs.mkdir("/tmp/clyde-"..user.."/"..foldername)
local f, err = io.open("/tmp/clyde-"..user.."/"..foldername.. "/" ..filename, "w")
local received = 0
+ http.PROXY = os.getenv('http_proxy');
local r, c, h = http.request {