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
const MY_DOMAIN = "help.splitbee.io" | |
const START_PAGE = "https://www.notion.so/splitbee/Help-Center-bbf26e2b70574901b9c98e5d11e449de" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", | |
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS", |
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
const MY_DOMAIN = "fka.dev" | |
const NOTION_MAIL = "[email protected]" | |
const START_PAGE = "https://www.notion.so/fkadev/fka-dev-0606b67bc0f14660992362682d6f7eda" | |
const DISQUS_SHORTNAME = "fkadev" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { |
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 | |
# Start the qgis dockerized dev version | |
# qgis 2019 workshop: Data Visualization and Cartography with QGIS | |
# Allow connections from any host | |
xhost + | |
# Start docker container with plugins path and qgis projects path mapped | |
# to persist and load existing qgis plugins | |
docker run --rm -it --name qgis \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ |
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
youtube-dl /usr/local/bin/youtube-dl -i --extract-audio --audio-format mp3 --audio-quality 512K --yes-playlist --playlist-start 1 --playlist-end 46 https://www.youtube.com/playlist?list={{ PLAYLIST ID }} |
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
avconv -f alsa -i hw:0 -f x11grab -r 25 -s 1680x1050 -i :0.0 -vcodec libx264 -threads 4 output-file2.avi |
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 | |
# rename photos | |
a=1 | |
for i in *.JPG; do | |
new=$(printf "%04d.JPG" ${a}) #04 pad to length of 4 | |
mv ${i} ${new} | |
let a=a+1 | |
done |
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
S-Responsabilidad simple (Single responsibility) | |
un objeto solo debería tener una única responsabilidad | |
O-Abierto/Cerrado (Open/Closed) | |
Las "entidades de software … deben estar abiertas para su extensión, pero cerradas para su modificación". | |
L-Sustitucion Liskov (Liskov substitution) | |
Los "objetos de un programa deberían ser reemplazables por instancias de sus subtipos sin alterar el correcto funcionamiento del programa" | |
I-Segregacion del interface (Interface segregation) |
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
# ESC mode | |
i => insert | |
a => add/insert at next word/space | |
o => new bottom line and insert | |
O => new up line and insert | |
w => next word | |
b => previous word | |
dd => cut line | |
yy => copy line |
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
# general # | |
use database; db.createCollection( 'collection' ); # create database with name database with empty collection named collection | |
use database; db.runCommand( { dropDatabase: 1 } ); or use database; db.dropDatabase(); # remove database | |
db.twits.remove(); # empty collection | |
db.twits.find().count(); # count all twits in the collection | |
mongodump -d database -c collection -o collection.dump # dump entire collection | |
mongorestore -d database -c collection myfoo.dump/database/collection.bson # restore dumped collection | |
mongoexport --db database --collection collection -q "{}{ "_id":0, "date":1, "lon":1, "lat":1 }" --csv -f "date,lon,lat" --out results_query.csv # export to CSV a query | |
# basic search and display # |
NewerOlder