Skip to content

Instantly share code, notes, and snippets.

View gjyoung1974's full-sized avatar
🎯
Focusing

Gordon Young gjyoung1974

🎯
Focusing
View GitHub Profile
@ArtemAvramenko
ArtemAvramenko / WScript.d.ts
Created August 2, 2015 02:02
TypeScript declarations for Windows Scripting Host
// Windows Script Host APIS
// http://blogs.msdn.com/b/freik/archive/2012/10/19/goofing-around-with-typescript-amp-windows-script-host.aspx
declare var ActiveXObject: { new (s: string): any; };
interface IWScriptStringCollection {
Item(n: number): string;
Count: number;
length: number;
}
@bojanpopic
bojanpopic / backup_github_issues.sh
Last active May 20, 2020 09:34
A (dirty) bash script that will backup issues from the GitHub repo using API. It takes pagination into consideration. Originally created by @boombatower. Done under a hour, so it can be improved (grep anyone?), but hey, it's one time script and it works. What more do you need? :)
#!/bin/bash
repo="" # put the name of the repo here. Usually it is like this: organization/repo-name
username="" # your github username
password="" # your github password
numberofpages= # leave blank for now and script will help you find the number of pages
if [ -z $numberofpages ]
then
echo "No number of pages set, lets find out how many pages are there"
@MajsterTynek
MajsterTynek / bootsect.asm
Created February 21, 2017 19:17
bootsector [NASM]
[bits 16]
[org 0x7c00]
; BIOS loads it at ... or ... :
; CS:IP = 07c0:0000
; CS:IP = 0000:7c00
jmp word 0x0000:start
start: ; just to be sure it has proper origin
; loading machine code from floppy
mov ah, 2 ; int 13h service: read sectors
@gjyoung1974
gjyoung1974 / aws_cli_cheat_sheet.txt
Created March 30, 2019 01:52
AWS CLI Cheat sheet
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@socketbox
socketbox / cube_solver.adoc
Last active May 23, 2022 21:17
Instructions for Solving Rubik's Cube as Presented by Robbie Gonzalez of Wired

Attributions

These instructions are an amalgam of steps presented by Wired’s Robbie Gonzalez, Phil of thecubicle.com, and JPerm of YouTube fame.

Definitions

A right trigger is R U R'

A left trigger is L' U' L

An r-alg is R U R' U'

@miguelgmalpha
miguelgmalpha / gist:5c9e78d16312d156b0ec1d1c1bb09c1c
Last active April 30, 2024 18:57
AWS Client VPN with SAML for Fedora
The AWS Client VPN for Linux is only provided for Ubuntu as a .deb package. I need it for Fedora. This was tested on Fedora 33.
https://docs.aws.amazon.com/vpn/latest/clientvpn-user/client-vpn-connect-linux.html
Get the vpn client deb package.
```
curl https://d20adtppz83p9s.cloudfront.net/GTK/latest/awsvpnclient_amd64.deb -o awsvpnclient_amd64.deb
```
Install `alien` to convert the deb package to rpm.