Skip to content

Instantly share code, notes, and snippets.

View kenmoini's full-sized avatar
⚙️
OPENSHIFTING IT INTO HIGH GEAR

Ken Moini kenmoini

⚙️
OPENSHIFTING IT INTO HIGH GEAR
View GitHub Profile
@thbkrkr
thbkrkr / gen-ssl.sh
Created April 7, 2015 16:15
Generate Self-Signed SSL Certificate without prompt
# Generate a passphrase
openssl rand -base64 48 > passphrase.txt
# Generate a Private Key
openssl genrsa -aes128 -passout file:passphrase.txt -out server.key 2048
# Generate a CSR (Certificate Signing Request)
openssl req -new -passin file:passphrase.txt -key server.key -out server.csr \
-subj "/C=FR/O=krkr/OU=Domain Control Validated/CN=*.krkr.io"
@drmalex07
drmalex07 / TestSkipValidation.java
Last active November 2, 2023 17:10
Create a new Java keystore. Add your trusted certificates. #java #jks #certificate #ssl #keystore
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.BufferedReader;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
@datagrok
datagrok / ergodox.md
Last active January 14, 2019 07:45
Reflections on my ErgoDox keyboard
@thatsdone
thatsdone / pdaemon-sample.py
Last active August 14, 2018 05:27
A python-daemon 'runner.DaemonRunner' class extension (v0.1) and a sample.
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#!/usr/bin/python
import sys
import time
import logging
from daemon import runner
#
# An example daemon main logic application class.
# Just keep writing timestamps to a log file periodically.
#
@amitsaha
amitsaha / xml_rpc_client.py
Created February 17, 2013 00:30
Simple usage of python-daemon
import xmlrpclib
s = xmlrpclib.ServerProxy('http://localhost:9900')
print s.uptime()
users = s.users()
for user in users:
for login in users[user]:
print user, login
@DavidMah
DavidMah / filedownloader.js
Created August 30, 2012 17:03
File Download requests using jquery/POST request with psuedo ajax
// Takes a URL, param name, and data string
// Sends to the server.. The server can respond with binary data to download
jQuery.download = function(url, key, data){
// Build a form
var form = $('<form></form>').attr('action', url).attr('method', 'post');
// Add the one key/value
form.append($("<input></input>").attr('type', 'hidden').attr('name', key).attr('value', data));
//send request
form.appendTo('body').submit().remove();
@ecin
ecin / phantomjs_facebook.js
Created April 23, 2012 21:06
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@jakebellacera
jakebellacera / ICS.php
Last active May 25, 2024 19:17
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*