Skip to content

Instantly share code, notes, and snippets.

View arehmandev's full-sized avatar
🎯
Focusing

Abdul Rehman arehmandev

🎯
Focusing
  • Capgemini
  • London, UK
View GitHub Profile
gem list
*** LOCAL GEMS ***
addressable (2.5.1)
aws-sdk (2.7.16)
aws-sdk-core (2.7.16)
aws-sdk-resources (2.7.16)
aws-sigv4 (1.0.0)
berkshelf (5.6.4)
@arehmandev
arehmandev / Jenkinsfile
Created April 12, 2017 10:10 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
For mac add this to your keymap.cson:
'.platform-darwin':
'cmd-alt-l': 'tree-view:toggle-focus'
Now press cmd-alt-l and watch the magic.
def app_name = 'app-name'
stage 'Checkout'
node {
checkout scm
}
stage 'Testing'
node {
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 ...
data "aws_ami" "coreos_etcd" {
most_recent = true
owners = ["${var.ownerid}"]
filter {
name = "architecture"
values = ["x86_64"]
}
@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() {
@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:
#!/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