Skip to content

Instantly share code, notes, and snippets.

JJ Asghar jjasghar

Block or report user

Report or block jjasghar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
IanColdwater / twittermute.txt
Last active Jan 25, 2020
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
brianshumate /
Last active Jan 20, 2020
The Simplest Terraform with Docker on macOS

If you'd like to experiment with Terraform on macOS locally, a great provider for doing so is the Docker provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

donniebishop /
Last active Dec 27, 2019
i3-blocklet for checking Pokemon Go status
#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
r = requests.get(POKEURL)
import lxml
camdez / breaktime.el
Last active Aug 29, 2015
/u/joeheyming's Emacs break timer (modified)
View breaktime.el
;;; See:
(defvar breaktime-timer nil
"Holds the running break timer (if any).")
(defvar breaktime-interval (* 3 60 60)
"How often to take a break, in seconds.")
(defun breaktime--take-a-break ()
(switch-to-buffer (get-buffer-create "*breaktime*"))
(let ((inhibit-read-only t))
View Winrm_setup.ps1
# On the remote node/server:
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
# When NOT USING a domain-based authentication (i.e., from Linux/Unix to Windows node):
winrm set winrm/config/service/auth '@{Basic="true"}'
function table() {
case "$1" in
echo "(╯°□°)╯︵ ┻━┻ "
echo "┬─┬ ノ( ゜-゜ノ)"
echo "(╯°Д°)╯︵ /(.□ . \)"
benweint / gdb-stuck-ruby.txt
Created Apr 16, 2013
An example of how to gather C and Ruby backtraces from a stuck Ruby process using gdb.
View gdb-stuck-ruby.txt
# Here's the script I'll use to demonstrate - it just loops forever:
$ cat test.rb
#!/usr/bin/env ruby
loop do
sleep 1
# Now, I'll start the script in the background, and redirect stdout and stderr
mudge / logstash.conf
Last active Apr 17, 2019
A grok pattern for Rails 3.2 logs for use with logstash. Assumes that you have a multiline filter to combine Rails logs into one line and only one worker is logging to a file (c.f.
View logstash.conf
multiline {
tags => ["rails"]
pattern => "^Started"
negate => true
what => "previous"
jakeonrails / Ruby Notepad Bookmarklet
Created Jan 29, 2013
This bookmarklet gives you a code editor in your browser with a single click.
View Ruby Notepad Bookmarklet
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
jordansissel /
Created Sep 21, 2012
screenshot + code showing how to query logstash/elasticsearch with a graphite function.

logstash queries graphed with graphite.

Operation: Decouple whisper from graphite.

Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.

Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?

The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.

You can’t perform that action at this time.