Skip to content

Instantly share code, notes, and snippets.

View fentas's full-sized avatar
🐷
Oink.

Jan Guth fentas

🐷
Oink.
View GitHub Profile
Commit Type Emoji Code UTF-8
Initial Commit 🎉 :tada:
Version Tag 🔖 :bookmark:
New Feature :sparkles:
Bugfix 🐛 :bug:
Metadata 📇 :card_index:
Refactoring ♻️ :recycle:
Documentation 📚 :books:
Internationalization 🌐 `:globe_with_merid
@fentas
fentas / bash.generate.random.alphanumeric.string.sh
Created April 29, 2017 19:09 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@fentas
fentas / app.js
Created September 28, 2015 09:46 — forked from andrewdeandrade/app.js
Node.js ('child_process').spawn bug with SSH
var spawn = require('child_process').spawn
var instance = {
ipAddress: "0.0.0.0"
};
var awsPreSharedKeyPath = '~/.ssh/aws-preshared-key.pem'; // make sure key has permissions 600 with chmod
var spawnArgs = [ '-tt', // force teletype since ssh uses a psuedo-terminal
@fentas
fentas / lc-tlscert.go
Created August 26, 2015 15:21
generate certs easily
/*
* Copyright 2014 Jason Woods.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
$ openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
...
$ openssl rsa -passin pass:x -in server.pass.key -out server.key
writing RSA key
$ rm server.pass.key
$ openssl req -new -key server.key -out server.csr
...
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:California
...
.style-2 input[type="text"] {
padding: 10px;
border: solid 5px #c9c9c9;
transition: border 0.3s;
}
.style-2 input[type="text"]:focus,
.style-2 input[type="text"].focus {
border: solid 5px #969696;
}
.my-container { position: relative; background: #5C97FF; overflow: hidden; } /* You could use :after - it doesn't really matter */ .my-container:before { content: ' '; display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.6; background-image: url('http://placekitten.com/1500/1000'); background-repeat: no-repeat; background-position: 50% 0; -ms-background-size: cover; -o-background-size: cover; -moz-background-size: cover; -webkit-background-size: cover; background-size: cover; }
@fentas
fentas / openflights-airports.js
Created July 4, 2015 11:03
Download and output airport database as geojson (openflights.org)
#!/usr/bin/env node
var got = require('got'),
csv = require('csv-parser'),
through = require('through2'),
geojsonStream = require('geojson-stream');
/**
* Download and output airport database
*
@fentas
fentas / gist:fa79167a82bf15160421
Created June 26, 2015 17:42
Multi-line strings in JavaScript and Node.js
var html = (function () {/*
2 <!DOCTYPE html>
3 <html>
4 <body>
5 <h1>Hello, world!</h1>
6 </body>
7 </html>
8 */}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1];