Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
contract EscrowContract {
address buyer;
address seller;
address agent;
// Each party has an entry here with the timestamp of their acceptance
uint[3] acceptances;
bool active;
@devigned
devigned / sp-w-cert-azps-1-0.ps1
Last active October 25, 2023 12:34
Create a service principal to auth with a certificate in Azure PowerShell 1.0
# Login to Azure PowerShell
Login-AzureRmAccount
# Create the self signed cert
$currentDate = Get-Date
$endDate = $currentDate.AddYears(1)
$notAfter = $endDate.AddYears(1)
$pwd = "P@ssW0rd1"
$thumb = (New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName com.foo.bar -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $notAfter).Thumbprint
$pwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText
@philandstuff
philandstuff / codemesh2015.org
Last active November 16, 2015 19:37
Code mesh 2015 notes

Kush, an introduction to schedulers

about me

  • I work for GDS
  • Cabinet Office
  • we started by building GOV.UK
    • replaced older sites like direct gov, business link
  • we’re not just fixing websites
    • we also build and run digital services
    • working with depts across the country
    • eg: register to vote
@Remiii
Remiii / README.md
Last active September 1, 2024 11:05
How to delete Vault (AWS Glacier) 🗻

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@cicorias
cicorias / gist:604286f96c833f246a37
Created February 9, 2015 21:15
Example of Azure Resource Manager Providers for a Subscription
{
"value": [
{
"id": "/subscriptions/<subscriptionId>/providers/Microsoft.Batch",
"namespace": "Microsoft.Batch",
"resourceTypes": [
{
"resourceType": "batchAccounts",
"locations": [
@cicorias
cicorias / makeSH256Cert.cmd
Created November 7, 2014 17:44
Make a self signed SH256 certificate...
makecert -pe -n "CN=ppistablet" -a sha256 -sky Exchange -eku 1.3.6.1.5.5.7.3.3 -ic c:\ppis\CA.cer -iv c:\ppis\CA.pvk -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -cy end -sv c:\ppis\ppistablet.pvk c:\ppis\ppistablet.cer
pvk2pfx -pvk c:\ppis\ppistablet.pvk -spc c:\ppis\ppistablet.cer -pfx c:\ppis\ppistablet.pfx -pi xxxxx
@tracker1
tracker1 / 01-directory-structure.md
Last active May 3, 2025 04:36
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@pasupulaphani
pasupulaphani / get_resp.js
Last active August 29, 2015 13:57
Handling requests and parsing responses via http.get or http.response
var Fiber = require('fibers')
var getResp = function (url, callback) {
var fn = Fiber(function () {
var resp = handleRequest(url);
if (resp.statusCode != 200) {
//handle success response
} else {
//handle other responses here
}
@edward
edward / gist:8572602
Created January 23, 2014 03:59
Running a Happy Hackfest Lessons from many Open Data hackfests

Happy Hackfests

Hi, my name is Edward. I work for an excellent company called Shopify. In my spare time, I put on hackfests with some excellent friends of mine.

Once upon a time, I went to a lot of tech-related meetups. I want to enough meetups that I started to know pretty much everyone who showed up. It was pretty much the same dudes interested in the same things every. single. time. Nice guys, but I wanted something a little different.

Fast-forward to some really awesome party I was at. There were all sorts of people from different backgrounds at this party, and they were all really smart, and really interesting. I met biologists specializing in arctic bacteria that live in semi-transparent rocks that naturally create condensation so that the bacteria can live. I met librarians who told me about the crazy political and philosophical beliefs that go into systems like the Library of Congress system of organizing books, and how you can still see the history of feminism and women’s suffrage just by lookin

@TooTallNate
TooTallNate / agent.js
Last active January 24, 2025 22:15
Node.js `http.Agent` class implementations...
/**
* Module dependencies.
*/
var net = require('net');
var inherits = require('util').inherits;
var EventEmitter = require('events').EventEmitter;
/**