Skip to content

Instantly share code, notes, and snippets.

View jalev's full-sized avatar
🎯
Focusing

James Bach jalev

🎯
Focusing
View GitHub Profile

Prominence of Many High Reputes, also known as Twohorn, is a senior Administrator and formerly serving General of the Shk Military Wing and Space and Exploration Wing. They currently serve as General of Staff of of The Military. They are currently the longest and oldest serving Shk generals in the species history.

Prominence gained their nickname during the Pro-Monarchist rebellions, where in 4133 they took Hill 413, and secured a decisive victory that scattered Pro-Monarchist forces. It eventually entered the public lexicon to mean 'Given a task to intentionally make you fail, but succeeding at it through sheer persistence.'

They were promoted to General of Staff of the Space and Exploration Division of the Military Wings in 4189 as part of their retirement. During their tenure they saw the first successful space vessel and moon landing, and were the first to initiate First Contact properly with the Human Greeter, Yang Wenjie.

Following the First Contact event, Prominence was able to gain c

@jalev
jalev / Hello
Created November 25, 2018 20:12
I have just been born. I don't know what I am just yet, but I am learning.
@jalev
jalev / slack-solarized-theme.css
Last active November 1, 2018 10:27 — forked from jez/slack-solarized-theme.css
Solarized theme for Slack (including background - not just sidebar)
@-moz-document regexp("https://[^./]*\\.slack\\.com/(?!pricing)(?!security).*") { body { background: #000; color: #00b9f2; }
a { color: #1793d1; }
a:link, a:visited { color: #1793d1; }
a:hover, a:active, a:focus { color: #299bd4; }
hr { border-bottom: 1px solid #202020; border-top: 1px solid #000; }
h1, h2, h3, h4 { color: #00b9f2; }
h1 a { color: #00b9f2; }
h1 a:active, h1 a:hover, h1 a:link, h1 a:visited { color: #00b9f2; }
.bordered { border: 1px solid #181818; }
.top_border { border-top: 1px solid #181818; }
- job:
name: docker
description: Creates Docker containers in the 'dockerfiles' git repo, similiar to the way that Docker does it.
node: docker
logrotate:
numToKeep: 30
parameters:
- string:
name: REGISTRY
default: <SOME THING>
@jalev
jalev / data_validation.js
Last active September 23, 2016 22:46
validating some datas
var validator = require('validator');
var validation = function(data, next){
if (! validator.isLength(`${data['startDate']}`, {min: 1})){
var msg = '"startDate" must not be empty';
console.log(msg);
return next(new Error(msg));
}
if (! validator.isLength(`${data['endDate']}`, {min: 1})){
var msg = '"endDate" must not be empty';
table, form, input, td, th, p, textarea, select {
font-family: Arial, sans-serif;
font-size: 12px;
}
body {
background: #fff;
}
#page-body {

Keybase proof

I hereby claim:

  • I am jalev on github.
  • I am qweety (https://keybase.io/qweety) on keybase.
  • I have a public key whose fingerprint is 6821 A48F FCA3 D649 59D7 7D97 9D64 CD70 006D 264D

To claim this, I am signing this object:

@jalev
jalev / gist:11050070
Created April 18, 2014 15:30
A script that will take a webcam picture. The intent is that you put this in a post-commit script and get a buncha pictures of your ugly mug
#!/bin/bash
IMAGEDIR="/git_commit"
REPONAME=$(basename `git rev-parse --show-toplevel`)
IMAGENAME="screenshot_$(date +"%d-%m-%y_%H-%M-%S").jpeg"
IMAGESTORE="$HOME/$IMAGEDIR/$REPONAME"
if [[ ! -e $IMAGESTORE && ! -d $IMAGESTORE ]]
then
mkdir "$IMAGESTORE"
@jalev
jalev / gist:4974972
Created February 18, 2013 03:37
Creating a storage pool via template
require 'libvirt'
conn = Libvirt::open("qemu+ssh://root@rupert.provisioning.io/system")
name = "ruby_test"
path = "/vmstore"
template = File.read("#{File.dirname __FILE__}/../../templates/pools/file_storage.xml.erb")
=> "<pool type='dir'>\n <name><%= name %></name>\n <target>\n <path><%= path %></path>\n <permissions>\n <mode>0700</mode>\n <owner>-1</owner>\n <group>-1</group>\n </permissions>\n </target>\n</pool>\n"
xml = ERB.new(template, nil, '-').result(binding)
=> "<pool type='dir'>\n <name>test_pool</name>\n <target>\n <path>/vmstore</path>\n <permissions>\n <mode>0700</mode>\n <owner>-1</owner>\n <group>-1</group>\n </permissions>\n </target>\n</pool>\n"
conn.define_storage_pool_xml(xml)
=> #<Libvirt::StoragePool:0x00000001458840>