Skip to content

Instantly share code, notes, and snippets.

View jamesdube's full-sized avatar
🛰️
To the moon

James Dube jamesdube

🛰️
To the moon
View GitHub Profile
@jamesdube
jamesdube / sysctl.conf
Created October 5, 2019 21:40 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@jamesdube
jamesdube / regex.txt
Last active February 5, 2024 14:29
Zimbabwe National ID Regex
# 00000000X00
/([0-9]{8,9}[a-z,A-Z][0-9]{2})/g
# 00-000000-X-00 dashes are optional
/([0-9]{2}-?[0-9]{6,7}-?[a-z,A-Z]-?[0-9]{2})/g
# 00-000000 X00 dash is required, space before letter is optional
/([0-9]{2}-[0-9]{6,7}\s?[a-z,A-Z][0-9]{2})/g
this.mockMvc.perform(post("/alerts")
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(mapper.writeValueAsString(request)))
.andDo(print())
.andExpect(status().isCreated())
.andExpect(jsonPath("$.success").value(true))
.andExpect(jsonPath("$.narrative").value("CLOSE ALERT WITH ID 989898989"));
@jamesdube
jamesdube / TODO
Created February 14, 2019 08:50 — forked from perrygeo/TODO
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio
@jamesdube
jamesdube / output
Created February 8, 2019 13:15 — forked from halberom/output
ansible - example of dict with array of arrays
PLAY [foo] ********************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [role1 | debug var=redis] ***********************************************
ok: [localhost] => {
"redis": {
"database_save_times": [
[
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
private <T> T factory(Class<T> clazz ){
try {
return clazz.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
@jamesdube
jamesdube / .gitconfig
Created November 13, 2018 13:32
Seperate git profiles for work and personal projects
[includeIf "gitdir:~/workspace/work/"]
path = .gitconfig-work
[includeIf "gitdir:~/workspace/personal/"]
path = .gitconfig-personal
http://cronus.allowed.org works for me, 2018.1.6
@jamesdube
jamesdube / example .travis.yml
Created October 9, 2018 10:26 — forked from jay-johnson/example .travis.yml
example .travis.yml
sudo: required
language: ruby
services:
- docker
before_install:
- echo "Testing Docker Hub credentials"
- docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD