I hereby claim:
- I am mendhak on github.
- I am mendhak (https://keybase.io/mendhak) on keybase.
- I have a public key whose fingerprint is 6989 CF77 4903 69CF FDCB CD89 95E7 D75C 76CB E9A9
To claim this, I am signing this object:
/** | |
* @openapi | |
* "/abc": { | |
* "get": { | |
* "description": "Welcome to swagger-jsdoc!", | |
* "responses": { | |
* "200": { | |
* "description": "Returns a mysterious string.", | |
* "content": { | |
* "text/xml": { |
@rate_limited_retry() | |
def get_search_issues(gh, author, type): | |
return gh.search_issues('', author=author, type=type) |
#!/usr/bin/python3 | |
""" | |
msysGit to Unix socket proxy | |
============================ | |
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows). | |
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the | |
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other |
import os | |
import pytz | |
import sys | |
import datetime | |
import dateutil.parser | |
import boto | |
downloadFolder = "downloads" | |
if len(sys.argv) > 1: |
import sys | |
import operator | |
# Given the data part of an NMEA sentence (Remove the $, remove the * onwards, keep the last comma) | |
# calculates the checksum | |
def checksum_calculate(nmeadata): | |
csum = 0 | |
for c in nmeadata: | |
csum ^= ord(c) |
public static class DataRecordExtensions | |
{ | |
public static T GetValue<T>(this IDataRecord reader, string columnName) | |
{ | |
object columnValue = reader[columnName]; | |
T returnValue = default(T); | |
if (!(columnValue is DBNull)) | |
{ | |
returnValue = (T)Convert.ChangeType(columnValue, typeof(T)); | |
} |
public static T GetValue<T>(this DataRow row, string field) | |
{ | |
if (!row.Table.Columns.Contains(field)) | |
{ | |
return default(T); | |
} | |
else | |
{ | |
return (T)Convert.ChangeType(row[field].ToString(), typeof(T)); |
$rawdisks = gwmi win32_diskdrive | where {$_.partitions -eq 0} | |
foreach ($r in $rawdisks) | |
{ | |
$available=ls function:[d-z]: -n | ?{ !(test-path $_) } | SELECT -First 1 | |
$diskIndex = $r.Index | |
Write-Host "Initializing Disk $diskIndex as $available. This will take a while." | |
(echo "list disk | |
select disk $diskIndex | |
online disk | |
attributes disk clear readonly |
#Source: https://stackoverflow.com/questions/2241063/bash-script-to-setup-a-temporary-ssh-tunnel | |
#SSH feature - control sockets | |
ssh -4 -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -M -S my-ctrl-socket -fnNT -L 10023:remoteserver.com:8000 dev@middleserver.internal | |
#Get PID - you'll have to parse this | |
ssh -S my-ctrl-socket -O check dev@middleserver.internal | |
#Exit | |
ssh -S my-ctrl-socket -O exit dev@middleserver.internal |
I hereby claim:
To claim this, I am signing this object: