Skip to content

Instantly share code, notes, and snippets.

View irfn's full-sized avatar
🤩
stargazing!

Irfan Shah irfn

🤩
stargazing!
View GitHub Profile
@irfn
irfn / test.md
Created October 10, 2023 11:48
Test Document

Title

Subheading

  1. Item 1
  2. Item 2
@irfn
irfn / mvt.md
Last active August 1, 2021 08:15
MVT investigation
@irfn
irfn / boson.sh
Last active April 22, 2020 09:58
getting in tune
#Random
curl http://$boseip:8090/info | xmllint --format -
curl http://$boseip:8090/presets | xmllint --format -
#Whats playing
curl "http://$boseip:8090/now_playing" | xmllint --format - | grep track | sed -e 's/<\/\{0,1\}track>//g'
#Volume
curl http://$boseip:8090/volume | xmllint --format - | grep actual | sed -e 's/<\/\{0,1\}actualvolume>//g'
#Update Volume
curl -H "Accept:application/json" -XPOST --data "<volume>40</volume>'" http://$boseip:8090/volume
@irfn
irfn / alacrity.yml
Last active August 31, 2023 14:36
alacrity config
env:
TERM: xterm-256color
window:
dimensions:
columns: 80
lines: 24
padding:
x: 2
@irfn
irfn / 0_all_webkit.patch
Last active June 12, 2018 15:44 — forked from fuxialexander/0_all_webkit.patch
One-stop patch for Emacs NS-port xwidget (by @veshboo)
From 2063aad860376419d899d1ae06ccb7daf56ef9ef Mon Sep 17 00:00:00 2001
From: Jaesup Kwak <veshboo@gmail.com>
Date: Mon, 4 Dec 2017 21:23:19 +0900
Subject: [PATCH] Support xwidget webkit for macOS X
Add xwidget webkit support for macOS X / NS Cocoa and accompanying
changes.
Squash changes for comments from Alan Third in Bug#29565.
@irfn
irfn / chef-to-hosts.sh
Last active July 31, 2017 10:56
pull ec2 hosts to dnsmasq
#!/usr/bin/env bash
cd $CHEF_INFRA_HOME/infrastructure;knife search node -a ipaddress "name:*p-* and chef_environment:production" | sed -e ':a' -e 'N' -e '$!ba' -e "s/:\n ipaddress:/ /g" | sed -e '/^\s*$/d' | awk '{print $2" "$1}'> /usr/local/etc/chef_hosts
cat /usr/local/etc/chef_hosts | awk '{print "host "$2"\n hostname " $1 "\n user ubuntu\n port 22\n IdentityFile ~/.ssh/id_rsa\n"}' > /usr/local/etc/ssh_config/chef
@irfn
irfn / yubikey-tunnelblick.sh
Last active October 2, 2018 14:17
Launch Tunnelblick profile with a token generated by a yubikey google authenticator profile
#!/usr/bin/env bash
TOKEN=$(yubioath show $1 | sed "/$1/ s/[a-z ]*//g")
read -r -d '' SCRIPT_TEMPLATE <<-'END'
tell application "Tunnelblick"NL
connect "$PROFILE"NL
delay 1NL
tell application "System Events"NL
keystroke $TOKENNL
delay 1NL
@irfn
irfn / sampleMarkdown
Last active August 29, 2015 14:05
sampleMarkdown
Sample Agenda
=========
Lets discuss the agenda in markdown!.
- Here is a list
- another list item
- Magic
Markdown is a lightweight markup language based on the formatting conventions that people naturally use in email.
@irfn
irfn / iptoweather
Created January 7, 2014 04:35
ip to weather
var locate = function(locationInfo) {
var city = locationInfo.city.replace(" ", "_");
var region = locationInfo.region;
$.get('http://api.wunderground.com/api/91425b2b253b294f/forecast/q/'+region+'/'+city+'.json', function(response) {
console.log(response.forecast.forecastday)})
});
}
$.get('http://ip-api.com/json/199.48.152.51?callback=locate')
touch ~/.zshmarks && source ~/.zshmarks
function b() {
echo "hash -d $1=\"`pwd`\"" >> ~/.zshmarks && source ~/.zshmarks
}