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
cd() { | |
# Check if no arguments to make just typing cd<Enter> work | |
# Also check if the first argument starts with a - and let cd handle it | |
if [ $# -eq 0 ] || [[ $1 == -* ]] | |
then | |
builtin cd $@ | |
return | |
fi | |
# If path exists, just cd into it | |
# (also, using $* and not $@ makes it so you don't have to escape spaces any more) |
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
# activate the virtualenv | |
source /home/superset/.virtualenvs/superset/bin/activate | |
fabmanager reset-password --app superset --username admin --password enteryournewpassword |
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
import {ipcMain} from 'electron' | |
const fs = require('fs') | |
const axios = require('axios') | |
/* ... */ | |
ipcMain.on('downloadFile', function (event, data) { | |
const filePath = data.filePath | |
const item = data.item |
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
// Colors reference | |
// You can use the following as so: | |
// console.log(colorCode, data); | |
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
// | |
// ... and so on. | |
export const reset = "\x1b[0m" | |
export const bright = "\x1b[1m" | |
export const dim = "\x1b[2m" |
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
// ==UserScript== | |
// @name OWA Keep Alive | |
// @namespace agartner.com | |
// @include https://webmail.dsu.edu/owa/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
setInterval(function(){onUserActivity()}, 600000) |