Skip to content

Instantly share code, notes, and snippets.

View Goddard's full-sized avatar
🎰
Coding

Ryein Goddard Goddard

🎰
Coding
View GitHub Profile
@Goddard
Goddard / __request
Created May 2, 2023 03:28 — forked from gotomypc/__request
Multiple Requests with Request (Node.js)
var request = require('request')
/**
* Handle multiple requests at once
* @param urls [array]
* @param callback [function]
* @requires request module for node ( https://github.com/mikeal/request )
*/
var __request = function (urls, callback) {
@Goddard
Goddard / mysql-docker.sh
Created April 22, 2021 12:54 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE

Keybase proof

I hereby claim:

  • I am goddard on github.
  • I am goddard (https://keybase.io/goddard) on keybase.
  • I have a public key ASAu65Z8bNOUiykkICqqfWW_jrfW2ApI-hnoy1c45addYgo

To claim this, I am signing this object:

body {
background-color: black;
}
#masthead {
top: 0;
z-index: 2;
}
.sticky-header {
@Goddard
Goddard / KeyMappings
Created January 29, 2020 00:02 — forked from geekontheway/KeyMappings
NerdTree
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
x.......Close the current nodes parent...........................|NERDTree-x|
@Goddard
Goddard / blockjs-in-chrome.js
Created November 20, 2019 19:39
Chrome print is blocking even though it is not in the same window or tab
<script>
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
@Goddard
Goddard / name-cheap-dynamic-dns.sh
Last active January 29, 2024 14:03
auto update ip script for dynamic dns
curl -i -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET https://dynamicdns.park-your-domain.com/update?host=@&domain=[domain]&password=[update-password]&ip=[local-ip]
@Goddard
Goddard / oidgen.vbs
Created June 26, 2019 15:31
This script is a modification to the original oidgen.vb script. It adds a required DLL register and prints it to a file for easy copy pasting and saving. -------------------- Generates an object identifier (OID) using a GUID and the OID prefix 1.2.840.113556.1.8000.2554. This script contributed by Omar Sinno of Microsoft. Original - https://gall…
' oidgen.vbs
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
' OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
' FITNESS FOR A PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved
' Improvements made by Ryein C. Goddard
'
' This script is not supported under any Microsoft standard support program or service.
#!/bin/sh
### BEGIN INIT INFO
# Provides: OpenVPN Autoconnect
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OpenVPN Autoconnect
# Description: OpenVPN Autoconnect
### END INIT INFO
@Goddard
Goddard / staircase.py
Created April 15, 2019 20:43
hankerrank staircase example python
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the staircase function below.
def staircase(n):