netsh wlan set hostednetwork mode=allow ssid="networkname" key="password" keyUsage=persistent
netsh wlan start hostednetwork
netsh wlan stop hostednetwork
This guide assumes you have the emmet
and language-babel
packages already installed in Atom
- Open the
keymap.cson
file by clicking onAtom -> Keymap…
in the menu bar - Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
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 slackId = 'U02D0FE5H' | |
var processStyles = str => | |
str.replace(/;/g, '!important;').replace(/\.color/g, '#client-ui .color') | |
window.addEventListener('load', () => { | |
var interval = setInterval(() => { | |
var $myStyle = document.getElementById('color_rule_color_' + slackId) |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
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 | |
# add to /usr/local/bin/killbydir | |
# chmod +x /usr/local/bin/killbydir | |
path=`pwd` | |
for process in `pgrep $1`; do | |
foo=(`pwdx $process`) | |
if [ ${foo[1]} = $path ]; then | |
pid=${foo[0]::-1} | |
`kill -9 $pid` | |
fi |
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
function deleteFiles(types = 'all') { | |
let files = []; | |
function deleteFilesByTypes(types, page = 1) { | |
TS.api.call('files.list', { | |
types, | |
user: boot_data.user_id, | |
page | |
}, (a, data) => { | |
files = [...files, ...data.files]; |
NewerOlder