Skip to content

Instantly share code, notes, and snippets.

View awkale's full-sized avatar
📈
developing

Alex Kale awkale

📈
developing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am awkale on github.
  • I am alexkale (https://keybase.io/alexkale) on keybase.
  • I have a public key ASDK9VTdby4W-27Rornx2uWoe6C0rQ-g5EKcO_rRYY6f2Ao

To claim this, I am signing this object:

@awkale
awkale / tmux.md
Last active February 4, 2019 16:57
#TMUX #cheatsheet

Windows (tabs)

c create window

w list windows

n next window

p previous window

f find window

@awkale
awkale / html_cheatsheet.html
Created October 15, 2018 13:58
#HTML #cheatsheet
<!-- The page we're linking to gains partial access to the linking page via the window.opener object. -->
target='_blank'
<!-- to prevent access, add -->
rel="noopener"
<!-- FF does not support "noopener" so add this -->
rel="noopener noreferrer"
<!-- window.open(); you're also "vulnerable" to this, so always reset the "opener" property -->
<script>
@awkale
awkale / angularCheatsheet.js
Last active April 13, 2018 23:04
angular cheatsheet #angularjs #cheatsheet
// find an object in an array based on object property
var objArray = [
{ id: 0, name: 'Object 0', otherProp: '321' },
{ id: 1, name: 'O1', otherProp: '648' },
{ id: 2, name: 'Another Object', otherProp: '850' },
{ id: 3, name: 'Almost There', otherProp: '046' },
{ id: 4, name: 'Last Obj', otherProp: '984' }
];
$filter('filter')(objArray, {id: 3}, true)[0];
@awkale
awkale / es6-cheatsheet.js
Last active May 23, 2019 14:39
ES6 #javascript #es6 #cheatsheet
// find an object in an array based on object property
const objArray = [
{ id: 0, name: 'Object 0', otherProp: '321' },
{ id: 1, name: 'O1', otherProp: '648' },
{ id: 2, name: 'Another Object', otherProp: '850' },
{ id: 3, name: 'Almost There', otherProp: '046' },
{ id: 4, name: 'Last Obj', otherProp: '984' }
];
let obj = objArray.find(function (obj) { return obj.id === 3; });
@awkale
awkale / npm_cheatsheet.sh
Last active March 9, 2020 20:26
NPM cheatsheet #cheatsheet
npm list -g --depth=0
// lists globally installed packages
npm outdated -g --depth=0
// lists globally outdated packages
npm update -g
// updates all globally installed packages
@awkale
awkale / python_cheatsheet.sh
Last active April 27, 2017 23:16
python cheatsheet #cheatsheet
virtualenv -p python3 env
# starts virtual environment
. ./env/bin/activate
# reloads to work in virtual environment
@awkale
awkale / vim_cheatsheet.sh
Last active June 20, 2021 21:47
#vim #cheatsheet
:q[uit]
# Quit Vim. This fails when changes have been made.
:q[uit]!
# Quit without writing.
:cq[uit]
# Quit always, without writing.
:wq
@awkale
awkale / git_cheatsheet.sh
Last active December 3, 2018 15:01
#git #cheatsheet
#
# GETTING STARTED
#
git init
# initializes current folder as a git repository
git clone url
# copies remote git folder to local directory
@awkale
awkale / camera.sh
Last active February 23, 2017 18:40
macbook camera fix
sudo killall VDCAssistant
sudo killall AppleCameraAssistant