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
// Convert string in CSV format to JSON | |
// Pass in a list of headers if the file doesn't have one | |
const csvToJSON = (csv, headers = null) => { | |
const lines = csv.split("\n"); | |
const _headers = !headers ? lines[0].split(",") : headers; | |
const data = lines.slice(headers ? 1 : 0).map((line) => { | |
const values = line.split(","); | |
return values.reduce((obj, value, index) => { | |
obj[_headers[index]] = value; | |
return obj; |
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
for debian systems | |
fyi -- can usually just double click to install a package but if not, `sudo dpkg -i [path]` works too | |
1. update your mirrors: | |
`sudo apt-get update` | |
2. install this library that the wxwidgets depends on (weird but ubuntu LTS doesn't come with it) |
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
{} |
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/bash | |
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab '<Primary>Tab' | |
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ prev-tab '<Primary><Shift>Tab' |
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 google tasks | |
// @match https://tasks.google.com/* | |
// @grant none | |
// ==/UserScript== | |
// Just go to tasks.google.com. Installing as a shortcut works too. | |
if(Object.values(document.getElementsByTagName('p')).map(a=>a.innerText).join(' ').includes('The requested URL was not found on this server. ')) | |
window.location.href="https://tasks.google.com/embed/?origin=https://calendar.google.com&fullWidth=1" | |
var s = document.createElement('style'); | |
s.textContent = 'body { display: inline !important }'; |
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
✘ ~ php php7cc.phar /run/user/1000/gvfs/REDACTED/wp-content/themes/AttorneyTheme/ | |
File: /run/user/1000/gvfs/REDACTED/wp-content/themes/AttorneyTheme/inc/blog-functions.php | |
> Line 248: Possible internal array pointer access/modification in a by-value foreach loop | |
current($attachment_ids); | |
File: /run/user/1000/gvfs/REDACTED/wp-content/themes/AttorneyTheme/vendor/import/offline/attorney-importer.php | |
> Line 19: Removed function "mysql_connect" called | |
mysql_connect($host, $uname, $dbpass); |
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
/** | |
* Arduino Song Code Generator - by Justin O'Boyle | |
* https://github.com/justinoboyle | |
* justin@justinoboyle.com | |
* | |
* This Node.JS script takes an input file of piano notation (I used notation from pianoletternotes.blogspot.com) and converts it into valid C++ code. | |
* | |
* Usage: | |
* node arduino-script.js # Uses bars.txt as input | |
* |
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
{ | |
"10012": "SoHo, Mn", | |
"10013": "Greenwich Village, Mn", | |
"10014": "West Village, Mn", | |
"10004": "Bowling Green, Mn", | |
"10005": "Financial District, Mn", | |
"10006": "Battery Park City, Mn", | |
"10007": "City Hall, Mn", | |
"10038": "Battery Park City, Mn", | |
"10002": "Lower East Side, Mn", |
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
main() { | |
# Use colors, but only if connected to a terminal, and that terminal | |
# supports them. | |
if which tput >/dev/null 2>&1; then | |
ncolors=$(tput colors) | |
fi | |
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
YELLOW="$(tput setaf 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
# add to .*rc | |
eval $(node -e "eval(new Buffer('bGV0IHsgcmVhZGRpclN5bmMgfSA9IHJlcXVpcmUoJ2ZzJyksIHsgam9pbiB9ID0gcmVxdWlyZSgncGF0aCcpOyBkaXJlY3RvcmllcyA9IFsgJy9BcHBsaWNhdGlvbnMvJywgJy9BcHBsaWNhdGlvbnMvVXRpbGl0aWVzJyBdO2RpcmVjdG9yaWVzLmZvckVhY2goZGlyID0+IHJlYWRkaXJTeW5jKGRpcikuZmlsdGVyKGEgPT4gYS5lbmRzV2l0aCgnLmFwcCcpKS5mb3JFYWNoKGZpbGUgPT4gY29uc29sZS5sb2coYFBBVEg9JFBBVEg6JHtqb2luKGRpciwgZmlsZSwgJy4vQ29udGVudHMvTWFjT1MnKS5zcGxpdCgnICcpLmpvaW4oJ1wgJyl9YCkpKQ==', 'base64').toString('ascii'))") |
NewerOlder