Skip to content

Instantly share code, notes, and snippets.

View crunchywelch's full-sized avatar
💭
floundering around crying and clutching my things

Aaron Welch crunchywelch

💭
floundering around crying and clutching my things
View GitHub Profile
#!/bin/bash
# execute this in the same directory that the report you wish to modify resides
command -v pdftk >/dev/null 2>&1 || { echo >&2 "pdftk not installed, aborting."; exit 1; }
command -v convert >/dev/null 2>&1 || { echo >&2 "convert not installed, aborting."; exit 1; }
command -v jpegoptim >/dev/null 2>&1 || { echo >&2 "jpegoptim not installed, aborting."; exit 1; }
rm *final*.pdf
echo "please select file to convert:"
#!/bin/bash
pattern="^[A-Z]"
function is_upper_AZ () {
if echo $1 | grep "$pattern" &> /dev/null
then
return 0
else
return 1
fi
var thisRegex = new RegExp('^[A-Z]');
function is_upper_AZ(x) {
return thisRegex.test(x);
}
console.log(is_upper_AZ('Dhfdsa'));
public class StringTester {
public static void main(String[] args) {
final String pattern = "^[A-Z].*";
return args[0].matches(pattern);
}
}
#!/usr/bin/python
import re, sys
regex = re.compile('^[A-Z]')
def is_upper_AZ(x):
return regex.match(x)
if is_upper_AZ(sys.argv[1]):
print('match')
#!/usr/bin/php
<?php
function is_upper_AZ($x) {
return preg_match('/^[A-Z]/', $x);
}
if(is_upper_AZ($argv[1])) {
echo 'true';
}
package main
import (
"fmt"
"regexp"
)
func main() {
if is_upper_AZ("Testing") {
fmt.Println("match")
@crunchywelch
crunchywelch / keybase.md
Created October 7, 2017 00:41
keybase.md

Keybase proof

I hereby claim:

  • I am crunchywelch on github.
  • I am crunchywelch (https://keybase.io/crunchywelch) on keybase.
  • I have a public key ASCTXSiyZi-qAkWhAmGpgSm15euf3JkvQZQc8uHcI9AnUwo

To claim this, I am signing this object:

{
"hostname": "test123",
"plan": "baremetal_0",
"facility": "ewr1",
"operating_system": "ubuntu_14_04",
"billing_cycle": "hourly"
}
@crunchywelch
crunchywelch / gitlab.yml
Last active March 8, 2017 20:36
some test yaml
#!/bin/bash
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install curl openssh-server ca-certificates postfix
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install gitlab-ce
sudo gitlab-ctl reconfigure