Skip to content

Instantly share code, notes, and snippets.

View jstrassburg's full-sized avatar

JiM Strassburg jstrassburg

View GitHub Profile
@jstrassburg
jstrassburg / Foo.sol
Created March 18, 2021 22:01
Smart contract payable constructor failing test.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.2;
contract Foo {
uint public value;
constructor() payable {
value = msg.value;
}
}
@jstrassburg
jstrassburg / example.com.cnf
Last active September 18, 2019 21:29
openssl certificate signing request with SANs
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
attributes = req_attributes
prompt = no
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = StateName
@jstrassburg
jstrassburg / boxstarter.ps1
Last active March 13, 2019 20:33
Boxstarter Personal PC
# Description: Boxstarter Script
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
@jstrassburg
jstrassburg / halloween_eyeballs.ino
Created October 31, 2018 20:28
My moving eyeball pumpkin Arduino code.
#include <Servo.h>
const int SERVO_COUNT = 10;
Servo servos[SERVO_COUNT];
const int SERVO_MIN = 40;
const int SERVO_MAX = 180;
void setup() {
for (int i = 0 ; i < SERVO_COUNT ; i += 1) {
#!/usr/bin/env bash
usage() {
echo "Usage: $0 /path/to/thing.pfx"
exit -1
}
if [ "$#" -lt 1 ]; then
usage
fi
@jstrassburg
jstrassburg / SolrCDLinks.md
Last active October 6, 2016 18:59
Solr Continuous Delivery with Jenkins Repo Links
@jstrassburg
jstrassburg / ceph_stuff.md
Created September 29, 2016 14:31
Useful Ceph Commands and Info
@jstrassburg
jstrassburg / install_java.sh
Created September 10, 2016 19:36
Automated Java 8 Install Ubuntu
#thanksOracle
sudo apt-get update -y
sudo apt-get install -y software-properties-common
sudo apt-add-repository -y ppa:webupd8team/java
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get update -y
sudo apt-get install -y oracle-java8-installer
@jstrassburg
jstrassburg / lvm.md
Last active April 13, 2017 17:52
Linux Logical Volume Management [LVM]

Linux Logical Volume Management [LVM]

Source: https://www.howtoforge.com/linux_lvm

LVM Layout

  • /dev/sdX or /dev/hdX are physical HDDs (SCSI or SATA)
  • /dev/vdX are virtual HDDs (virtualization aware driver)
  • /dev/sda1 would be the first partition on the /dev/sda disk
@jstrassburg
jstrassburg / elastic-spatial.py
Created July 11, 2015 14:23
elasticsearch-py spatial example
from datetime import datetime
from elasticsearch import Elasticsearch
class Program():
es = Elasticsearch()
def __init__(self):
pass