Skip to content

Instantly share code, notes, and snippets.

View awkwords's full-sized avatar

awkwords awkwords

View GitHub Profile
@MohamedMesahel
MohamedMesahel / Regex-Tutorial.md
Last active September 11, 2021 00:21
Regex Tutorial - JavaScript

Regex Tutorial - JavaScript

If you have encounter Regular Expressions, they may seem like a random string of gibberish. While they might look awkward (confusing syntax), they are also extremely useful. Understanding regular expressions will make you a much more effective programmer. In order to fully understand the regex world you first need to learn the basics concepts, on which you can later build.

A regular expression is a string that describes a pattern e.g., email addresses and phone numbers. In JavaScript, regular expressions are objects. JavaScript provides the built-in RegExp type that allows you to work with regular expressions effectively.

Summary

@ramitsurana
ramitsurana / jenkins-aws-docker.sh
Last active March 27, 2018 16:15
Setting up jenkins,docker and git pipeline
## Install Jenkins
$ sudo yum update
$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
$ sudo yum install jenkins
$ sudo service jenkins start
$ sudo chkconfig jenkins on
## Install Docker (Amazon EC2 Container Service)
@yohanesgultom
yohanesgultom / ! Python Scripts
Last active August 11, 2023 16:30
Random python scripts
Random collection of python scripts
@JamieCressey
JamieCressey / dict_to_dynamodb_item.py
Created April 24, 2016 20:56
Coverts a standard Python dictionary to a Boto3 DynamoDB item
def dict_to_item(raw):
if type(raw) is dict:
resp = {}
for k,v in raw.iteritems():
if type(v) is str:
resp[k] = {
'S': v
}
elif type(v) is int:
resp[k] = {
@dgoade
dgoade / parse_args.sh
Last active November 4, 2015 14:55
Automation Scripting Essentials, Bash: Combine positional args with options
#!/bin/bash
# Automation Scripting Essential Skills: https://github.com/dgoade/ase
# Bash
# Input: Getting command line paramaters
echo "======================="
logMsg="Third technique -- combine positional args and emulate getoptslong"
echo "${logMsg}"
echo "args: ${@}"
@clochix
clochix / casperShell.js
Created October 8, 2013 09:37
Sample code to call a shell script from CasperJS
// (…)
var childProcess;
try {
childProcess = require("child_process");
} catch (e) {
this.log(e, "error");
}
if (childProcess) {
childProcess.execFile("/bin/bash", ["mycommand.sh", args1, args2, args3], null, function (err, stdout, stderr) {
this.log("execFileSTDOUT:", JSON.stringify(stdout), 'debug');
@trevorturk
trevorturk / gists.rb
Created February 14, 2013 18:48
Delete all private gists
# gem install httparty
# ruby gists.rb
require 'httparty'
class Gists
include HTTParty
@username = 'x'
@password = 'x'