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
| # | |
| # ~/.bash_profile | |
| # | |
| # Do everything in bashrc | |
| [[ -f ~/.bashrc ]] && . ~/.bashrc |
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
| # /etc/systemd/system/update-ddns.service | |
| [Unit] | |
| Description=Update DDNS | |
| Documentation=https://dns.he.net/docs.html | |
| Wants=network-online.target | |
| After=network-online.target | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/bin/bash /root/update-ddns.sh |
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
| var test = require('tape') | |
| var tmp = require('temporary-directory') | |
| var tempDir | |
| var cleanupTestDir | |
| test('set up temp dir', function (t) { | |
| tmp('bigup', function created (err, dir, cleanup) { | |
| t.error(err, 'temp dir created without error') | |
| cleanupTestDir = cleanup |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Websockets!!!11</title> | |
| </head> | |
| <body> | |
| <button name="button">Click me</button> | |
| <script src="/socket.io/socket.io.js"></script> | |
| <script> |
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
| var ioClient = require('socket.io-client') | |
| var socket = ioClient() | |
| socket.on('refresh', function(data) { | |
| window.location.reload(); | |
| }) |
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
| echo dropping $1 | |
| sudo iptables -I INPUT -s $1 -j DROP |
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
| ╭━━━┳━━━┳━━┳━━━╮ | |
| ┃╭━╮┃╭━╮┣┫┣┻╮╭╮┃ | |
| ┃┃╱┃┃┃╱╰╯┃┃╱┃┃┃┃ | |
| ┃╰━╯┃┃╱╭╮┃┃╱┃┃┃┃ | |
| ┃╭━╮┃╰━╯┣┫┣┳╯╰╯┃ | |
| ╰╯╱╰┻━━━┻━━┻━━━╯ |
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
| # Put in /etc/systemd/system or ~/.config/systemd/user/ if running with --user flag | |
| [Unit] | |
| Description=Example Node Systemd Service | |
| [Service] | |
| ExecStart=/usr/local/bin/node /home/project-folder/server.js | |
| Restart=always | |
| StandardOutput=syslog | |
| SyslogIdentifier=logid |
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
| var path = require('path') | |
| function requireCss (module) { | |
| var packagejson = module + '/package.json' | |
| var pathName = path.dirname(require.resolve(packagejson)) | |
| var stylePath = require(packagejson).style | |
| var style = path.join(pathName, stylePath) | |
| return { | |
| style: style, | |
| path: path.dirname(style) |
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
| # based on script from here: | |
| # https://help.github.com/articles/working-with-ssh-key-passphrases#platform-windows | |
| # https://github.com/lukesampson/pshazz/blob/41f5c7b832acf862a12cf4630bbe88e6e12f6e6e/plugins/ssh.ps1 | |
| # Note: ~/.ssh/environment should not be used, as it | |
| # already has a different purpose in SSH. | |
| env=~/.ssh/agent.env | |
| # Note: Don't bother checking SSH_AGENT_PID. It's not used |