ssh root@<IP> -P
passwd # change root password
apt-get update
apt-get install sudo
useradd -m juno -s /bin/bash -g sudo
passwd juno
su juno
mkdir .ssh
This file contains 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 https://gist.github.com/beevelop/a0f2c76e79610dca01550c9a93f83876 | |
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white; border: 0;') | |
document.querySelector('body').appendChild(document.querySelector('#readme')) | |
document.querySelector('#readme > .Box-header').setAttribute('style', 'display: none !important') | |
document.querySelector('#readme > .Box-body').setAttribute('style', 'padding-top: 0 !important;') | |
document.querySelectorAll('li').forEach(function(li) {li.setAttribute('style', 'line-height: 1.4; font-size: 15px;')}) | |
document.querySelectorAll('p').forEach(function(p) {p.setAttribute('style', 'font-size: 15px;')}) | |
document.querySelectorAll('h2').forEach(function(h2) {h2.setAttribute('style', 'margin-bottom: 14px')}) |
This file contains 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
{"lastUpload":"2020-07-02T22:26:45.065Z","extensionVersion":"v3.4.3"} |
This file contains 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
<snippet> | |
<content><![CDATA[log.debug('$2 $1', $1);$0]]></content> | |
<tabTrigger>deb</tabTrigger> | |
<scope>source.js</scope> | |
<description>log.debug()</description> | |
</snippet> |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
This file contains 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/sh | |
# 5:23 PM Friday, October 18, 2013 - Jim Priest | |
# origin script found here: http://python.dzone.com/articles/tips-using-git-pre-commit-hook | |
# Modified with console checks and to ignore commented file | |
FILES_PATTERN='\.(js|coffee)(\..+)?$' | |
FORBIDDEN='ddescribe\|iit\|console\.log' | |
if git diff --cached --name-only | grep -E -q $FILES_PATTERN ; | |
then |
This file contains 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
// minesweeper goals | |
// - board with (height, width, numOfMines) | |
// - [x] create board with no mines | |
// - [x] create board with mine | |
// - [x] randomly place mines | |
// - [x] loop through each square without bomb and calculate value | |
// - [x] handle squares on edges | |
// - insert #s surrounding block | |
// - [x] insert 1 correct hint | |
// note: (0, 0) is top left |