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;
}
@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
@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"
@tckz
tckz / registry.js
Created June 30, 2009 09:36
jscriptでレジストリ参照(リモート可)
var Registry = function () {
this.initialize.apply(this, arguments);
};
Registry.prototype = {
initialize: function(computer) {
var locator = new ActiveXObject("WbemScripting.SWbemLocator");
var server = locator.ConnectServer(computer, "root\\default");
this.stdregprov = server.Get("StdRegProv");
@akirad
akirad / Snmpwalk.java
Last active June 11, 2019 08:57
An example of snmpwalk by java. It needs snmp4j. [Compile] javac -cp <path to a snmp4j.jar> Snmpwalk.java [Execute] java -cp <path to a snmp4j.jar>;. Snmpwalk If there is not the current dir in the path of -cp, java can't find Snmpwalk class...
import java.io.IOException;
import java.util.List;
import org.snmp4j.CommunityTarget;
import org.snmp4j.Snmp;
import org.snmp4j.TransportMapping;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.GenericAddress;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;
namespace JoeKingry
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
class Program
{
static void Main(string[] args)