Skip to content

Instantly share code, notes, and snippets.

View jas-'s full-sized avatar
🏃‍♂️

Jason Gerfen jas-

🏃‍♂️
View GitHub Profile
@jas-
jas- / launcher
Created September 28, 2013 18:05
VM Launcher & creator
#!/bin/bash
# VM launcher
# Jason Gerfen <jason.gerfen@gmail.com>
# Create new if asked
if [ "$1" == "install" ]; then
if [ -f "$3" ]; then
dd if=/dev/zero of=vm/$2 bs=516096 seek=9182 count=0
qemu-system-x86_64 -m 2048 -boot d -cdrom $3 vm/$2 -net nic -net user
@jas-
jas- / example-output
Last active December 25, 2015 17:29
Extensive test case for [PR #6330](https://github.com/joyent/node/pull/6330)
Testing SPKAC data created with 1024 key size
Performing tests on SPKAC which used md4 hashing algorithm
Valid: true
Challenge: b5b36119-669a-4d9c-a2c7-0fc4aa25e2a6
Public key:
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcvQh9SKOPv4DwI8LwSaFx02h7
l9QCiDs6sF2GfsSTEUG61SnjQ/v4uJiLKBgbVOagj9rkSCwtTez23ATPeGaBj2Zg
ipv+tv5IXyqUP8ropXJQ5ELtaXPUN/gvw7cO5EbPHr/7eMhbpw8Gl+AfWxW5hLW8
MGw/+AwwjHBOwong/QIDAQAB
@jas-
jas- / TLS-client.js
Last active December 27, 2015 01:48
Experimental server/client (TLS) w/ DH exchange (susceptable to MITM w/o pre-shared secret)
var fs = require('fs')
var opts = {
host: 'node.dev',
port: 3000,
key: fs.readFileSync('certificate.key'),
cert: fs.readFileSync('certificate.crt'),
//ca: [fs.readFileSync('authority.cer')],
passphrase: 'password',
ciphers: 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH',
@jas-
jas- / gist:7546619
Last active December 28, 2015 18:58
superagent test case
var chai = require('chai'),
expect = chai.expect,
config = require('../config/settings'),
app = require('../libs/app'),
https = require('https'),
test = require('supertest')
describe('app.js', function(){
describe('routes', function(){
@jas-
jas- / example.js
Last active October 4, 2017 19:19
crypto.createSign() using DH private key use case
/* Bob's environment */
var crypto = require('crypto');
var rsa = require('ursa');
crypto.DEFAULT_ENCODING = 'hex'
var dhBob = crypto.getDiffieHellman('modp18')
, kBob = dhBob.generateKeys()
, keysBob = {
pubKey: dhBob.getPublicKey(),
@jas-
jas- / .gdbinit
Last active May 13, 2020 20:29
Memory scraping
python
sys.path.insert(0, '/path/to/module/dir')
import hexdump
end
@jas-
jas- / laag-one2many.sql
Last active August 29, 2015 14:01
SQLite Structure & Contents for small collection
-- Handles dates
-- |_ id referenced by dates2objects as foreign key
DROP TABLE IF EXISTS `dates`;
CREATE TABLE `dates` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`date` INT(4) UNIQUE DEFAULT NULL
);
-- Handles origin
-- |_ id referenced by origin2objects as foreign key
@jas-
jas- / JSON-data.json
Last active June 14, 2022 03:29
HTML5 Template population w/ JSON object example
{
"id": 1,
"callID": "N6494 .M35",
"author": "Scott, Michael",
"title": "Arte correo",
"date": "1981",
"description": "At head of cover: ENAP, UNAM.",
"language": [
"Spanish",
"Portuguese"
@jas-
jas- / readme.md
Last active March 1, 2022 12:57
FreeBSD jail w/ services

myprint.scl.utah.edu

The myprint service handles wireless printing for the MLIB PC labs. FreeBSD is the operating system that was chosen for this service primarily for its security features.

Details on the current configuration of myprint.scl.utah.edu can be found below. 07/12/2013

Host OS configuration

This first section details the various configuration options applied to the kernel, NAT & traffic passing to jailed (non routable net) env, usage of IPFW service to filter incoming & outgoing traffic to specific subnets & or targets, OS, Jail & TCP stack hardening options

@jas-
jas- / readme.md
Last active February 7, 2021 05:01
Ulteo-OVD implementation guide

Ulteo Remote Application Server

Installation, configuration, patching & troubleshooting guide to the Ulteo-OVD services. Additional details of this software can be found on their website. Here are some useful resources.

  1. Ulteo home - http://www.ulteo.com/home/
  2. Ulteo Downloads - http://ulteo.com/home/en/ovdi/openvirtualdesktop/3.0
  3. Ulteo OVD source code - http://www.ulteo.com/home/en/download/sourcecode
  4. Additional OVD source code access - http://archive.ulteo.com/mirror/ovd/releases/sources/
  5. Community forums - https://groups.google.com/forum/?fromgroups#!forum/ulteo-ovd-community-support