Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@Remiii
Remiii / README.md
Last active March 6, 2024 19:52
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
@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
@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
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;
@ianphil
ianphil / DockerNetworkHack.sh
Created June 23, 2016 20:03
I was in meetings all day and used that time to learn a little about Docker Networks.
#
# Learn About Docker Networks
# github/tripdubroot
# Docker version 1.12.0-rc2
# build 906eacd
# experimental
#
# https://docs.docker.com/engine/userguide/networking/dockernetworks/#docker-embedded-dns-server
# https://docs.docker.com/engine/userguide/networking/configure-dns/
# https://github.com/docker/libnetwork/blob/ed311d050fda7821f2e7c53a7e08a0205923aef5/resolver.go
@martinwoodward
martinwoodward / PInvokeSamples.cs
Created June 28, 2016 09:32
Example of PInvoke from Linux with .NET Core
using System.Runtime.InteropServices;
namespace PInvokeSamples {
public static class Program {
// Import the libc and define the method corresponding to the native function.
[DllImport("libc.so.6")]
private static extern int getpid();
public static void Main(string[] args){

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@tomconte
tomconte / compile-deploy-sign.js
Created January 3, 2017 14:25
Shows how to compile and deploy a Smart Contract using client-side transaction signature, i.e. does not require the account to be unlocked in the Ethereum node.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
const Tx = require('ethereumjs-tx')
// Private key to use to sign the transactions
// To decrypt your private key, use e.g. https://www.myetherwallet.com/#view-wallet-info
// You will find your private key file in e.g. .ethereum/keystore or .parity/keys
// In this example the key should correspond to the web3.eth.coinbase address
var privateKey = new Buffer('088c110b6861b6c6c57461370d661301b29a7570d59cb83c6b4f19ec4b47f642', 'hex')