Skip to content

Instantly share code, notes, and snippets.

View arehmandev's full-sized avatar
🎯
Focusing

Abdul Rehman arehmandev

🎯
Focusing
  • Freelance
  • London, UK
View GitHub Profile
@arehmandev
arehmandev / vscode
Last active March 12, 2019 10:49
VScode settings
So vscode rocks, I've happily moved to it from Atom
#code --list-extensions
Borke.puppet
HookyQR.beautify
PeterJausovec.vscode-docker
RomanPeshkov.go-test-outline
bbenoist.vagrant
bibhasdn.django-html
@arehmandev
arehmandev / main.go
Created September 8, 2017 15:27
Finding files in a directory using go - absolute filepath
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"regexp"
)
@arehmandev
arehmandev / both files
Last active August 24, 2017 15:02
tmux
#~/.bashrc
if command -v tmux>/dev/null; then
[[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux
fi
alias fortune='fortune | cowsay | lolcat'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
tmux source-file ~/.tmux.conf
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-9501c8fa"
},
#!/bin/bash
# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <ext> <jdk_version>
# ext: rpm
# jdk_version: default 8
ext=rpm
jdk_version=8
@arehmandev
arehmandev / wannacry.py
Last active May 13, 2017 21:26
Test if WannaCry sinkhole is reachable
import urllib2
from urllib2 import urlopen
ipverifier = "http://ip.42.pl/raw"
publicip = urlopen(ipverifier).read()
url = "http://iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com/"
def sinkholetest(endpoint):
try:
@arehmandev
arehmandev / main.go
Created May 13, 2017 19:32 — forked from eduncan911/main.go
Go/Reading Console Inputs
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
data "aws_ami" "coreos_etcd" {
most_recent = true
owners = ["${var.ownerid}"]
filter {
name = "architecture"
values = ["x86_64"]
}
ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(
InVMConnectorFactory.class.getName()));
// In this simple example, we just use one session for both producing and receiving
ClientSessionFactory factory = locator.createClientSessionFactory();
ClientSession session = factory.createSession();
// A producer is associated with an address ...
def app_name = 'app-name'
stage 'Checkout'
node {
checkout scm
}
stage 'Testing'
node {