This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
| --header 'Accept: application/vnd.github.v3.raw' \ | |
| --remote-name \ | |
| --location https://api.github.com/repos/owner/repo/contents/path | |
| # Example... | |
| TOKEN="INSERTACCESSTOKENHERE" | |
| OWNER="BBC-News" | |
| REPO="responsive-news" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gecko and webkit | |
| // details here https://developer.mozilla.org/en-US/docs/DOM/event.initKeyEvent | |
| var keyboardEvent = document.createEvent("KeyboardEvent"); | |
| var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; | |
| keyboardEvent[initMethod]( | |
| "keydown", // event type : keydown, keyup, keypress | |
| true, // bubbles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twisted.internet.protocol import Factory | |
| from twisted.internet.endpoints import TCP4ClientEndpoint, connectProtocol | |
| from twisted.internet import reactor, defer, stdio | |
| from twisted.protocols.basic import LineReceiver | |
| import json | |
| your_name = "bmannix" | |
| class NotConnectedError(BaseException): pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -xe | |
| #THIS SCRIPT MUST BE RUN AS ROOT | |
| ADMIN_USER=admin | |
| ADMIN_GROUP=admin | |
| #add admin group | |
| (cat /etc/group | grep -E '\b$ADMIN_GROUP\b') || sudo groupadd $ADMIN_GROUP |