Skip to content

Instantly share code, notes, and snippets.

View deanet's full-sized avatar
:octocat:
talk is cheap, show me the code

deanetdavid deanet

:octocat:
talk is cheap, show me the code
View GitHub Profile
@deanet
deanet / gen-pass.sh
Created February 6, 2016 02:37
random password generator
#!/bin/bash
< /dev/urandom tr -dc '1-9A-HJ1-9@#^&)(*%KMNP-Za-hjk5-9mnp-z1-9' | head -c12 ; echo
@deanet
deanet / live-youtube-id.sh
Created February 4, 2016 02:15
grab id live youtube
#!/bin/bash
appstoken=""
user=""
currentid=`cat /tmp/currentid.txt`
newid=`/usr/bin/curl -vvv -L "https://www.youtube.com/user/arraudhahsolo" | grep "yt-badge-live" -B 10 | grep -A 5 "yt-lockup-title" | grep watch | sed -e 's/^.*\/watch?v=//g' | cut -d \" -f 1`
if [ "$newid" == "" ]; then
/***********************************************************************
Mini Clock v1.0, Jul 2014 by Nick Hall
Distributed under the terms of the GPL.
For help on how to build the clock see my blog:
http://123led.wordpress.com/
Tested on IDE v1.6.6
-----
@deanet
deanet / gen-le-ssl.sh
Last active August 18, 2016 08:21
Quick Let's Encrypt Generate SSL
#!/bin/bash
##
##get acme_tiny
[ -d "./acme-tiny" ] && echo "Directory acme_tiny exists." || mkdir ./acme-tiny;
##curl https://raw.githubusercontent.com/diafygi/acme-tiny/master/acme_tiny.py > acme-tiny/acme_tiny.py
#curl https://raw.githubusercontent.com/deanet/acme-tiny/46b792aff37c0a18b86b7cf262e143ea1f230374/acme_tiny.py > acme-tiny/acme_tiny.py
curl https://raw.githubusercontent.com/deanet/acme-tiny/master/acme_tiny.py > acme-tiny/acme_tiny.py
<?php
/**
* Easiest to use composer to install google-api-php-client and generate autoloader
* If you dont want to use composer you can manually include any needed files
*/
include_once 'vendor/autoload.php';
/**
* Client ID from https://console.developers.google.com/
* Must be added in Google Apps Admin console under Security -> Advanced -> Manage API client access
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@deanet
deanet / rc.d
Last active August 29, 2015 14:04 — forked from jippi/rc.d
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
{
"type": "Point",
"coordinates": [
110.37805080413818,
-7.793082580141326
],
"properties": {
"marker-size": "large",
"marker-symbol": "star",
"What": "Passion Projects",
{
"type": "Point",
"coordinates": [
-7.794337,
110.355177
],
"properties": {
"marker-size": "large",
"marker-symbol": "star",
{
"type": "Point",
"coordinates": [
-7.794337,
110.355177
],
"properties": {
"marker-size": "large",
"marker-symbol": "star",