Skip to content

Instantly share code, notes, and snippets.

View jjasghar's full-sized avatar

JJ Asghar jjasghar

View GitHub Profile
@jjasghar
jjasghar / nat.sh
Created September 22, 2016 00:18
basic nat setup with iptables with default OpenVPN network
#!/bin/bash
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
export LAN=ens160 #change to your nic
export WAN=ens192 #change to your nic
@jjasghar
jjasghar / vmware_chef.md
Created September 13, 2016 22:26 — forked from swalberg/vmware_chef.md
VMware and Chef Tools

VMware and Chef tools

Chef and VMware are a natural pairing and there are several tools available to enhance the integration.

Knife is a command-line tool that provides an interface between a local chef-repo and the Chef server and allows you to manipulate objects on the Chef server. Knife plugin allows your computer to talk to a 3rd party systems like vSphere or vRA. A plugin can create a VM in vSphere and then bootstrap it with Chef, for example, or it can expose your vRa catalog to your workstation so you don't need to use a GUI.

The following are the main interfaces with VMware and Chef our "knife" plugins.

@jjasghar
jjasghar / pokestat.py
Created July 18, 2016 21:31 — forked from donniebishop/pokestat.py
i3-blocklet for checking Pokemon Go status
#!/usr/bin/env python3
from bs4 import BeautifulSoup
import requests
POKEURL = 'http://cmmcd.com/PokemonGo/'
STATUSES = {
'Online!': 0,
'Unstable!': 1,
'Offline!': 2,
@jjasghar
jjasghar / Rakefile
Created June 13, 2016 20:49 — forked from burtlo/Rakefile
Using ERB
namespace :gsub do
desc 'populate a configuration'
task :populate do
content = File.read('config.yml')
content.gsub!('REPLACE_ME_KEY','REAL_KEY')
content.gsub!('REPLACE_ME_ID','REAL_ID')
puts content
end
@jjasghar
jjasghar / yas-company-helm.el
Last active December 13, 2021 16:19 — forked from fletch/yas-company-helm.el
Yasnippet + company + helm
;; http://emacs.stackexchange.com/questions/10431/get-company-to-show-suggestions-for-yasnippet-names
;; Add yasnippet support for all company backends
;; https://github.com/syl20bnr/spacemacs/pull/179
(defvar company-mode/enable-yas t
"Enable yasnippet for all backends.")
(defun company-mode/backend-with-yas (backend)
(if (or (not company-mode/enable-yas) (and (listp backend) (member 'company-yasnippet backend)))
backend
(append (if (consp backend) backend (list backend))
@jjasghar
jjasghar / breaktime.el
Last active August 26, 2015 17:03 — forked from camdez/breaktime.el
/u/joeheyming's Emacs break timer (modified)
;;; See: https://www.reddit.com/r/emacs/comments/3icpo7/take_a_break_every_3_hours/
(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 ()
(interactive)
(switch-to-buffer (get-buffer-create "*breaktime*"))
(let ((inhibit-read-only t))
#!/bin/bash
# exit on any error
set -o errexit
# A few tunable variables
NAME='atomic'
NAME='try'
#NAME='test'
#DISK='/guests/rhel-guest-image-7.1-20150224.0.x86_64.qcow2'

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

[DEFAULT]
#
# From tempest.config
#
# Whether to disable inter-process locks (boolean value)
#disable_process_locking = false
# Directory to use for lock files. (string value)
#
# Cookbook Name:: Cookbook
# Spec:: default
#
require 'spec_helper'
describe 'cookbook::default' do
shared_examples_for :default_recipe do