Run with phantomjs rasterize.js URL FILENAME
.
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
"C:\Program Files (x86)\pgAdmin III\1.18\pg_dump.exe" --host DBHOST --port 5432 --username "DBUSER" --format custom --blobs --verbose --file "OUTFILE.backup" "DBNAME" |
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 http = require('http'); | |
var port = process.env.PORT || 3000; | |
var server = http.createServer(function(req, res) { | |
res.end('Hello, world!'); | |
}); | |
server.listen(port, function () { | |
console.log('Hello world web server running on port %s', port); |
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
REM create a csv from a directory of files | |
forfiles /p "C:\myfolder" /s /m *.jpg /c "cmd /c if @isdir==FALSE echo @path,@file,@fsize" > myfolder_jpg.csv |
-
ngrok, http://ngrok.com/ A reverse tunnel. Run a server locally in any language and give it a public domain. Good for testing and demoing.
-
Firebase, https://www.firebase.com/ Database in the cloud, with extensive APIs, including OAuth.
-
Tonic, https://tonicdev.com/ Node prototyping in the browser, and cloud hosting of APIs using "Endpoint".
-
Fieldbook, https://fieldbook.com/developers
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
# Open a database connection | |
psql -h myserver -U myuser mydatabase | |
# Use `\copy` to copy data to a local file, not one on the server. | |
\copy (select * from mytable where ...) to 'C:\output.copy` | |
# Copy the data into the new database | |
\copy mytable from 'C:\output.copy' |
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
@echo off | |
for %%a in (DB1,DB2,DB3) do call psql -h DBHOST -c "SQL" -t -A -F , %%a DBUSER |
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
select t1.datname AS db_name, | |
pg_size_pretty(pg_database_size(t1.datname)) as db_size | |
from pg_database t1 | |
order by pg_database_size(t1.datname) desc; | |
-- credit to http://stackoverflow.com/a/18907188/192217 |
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
docker-machine start dev | |
# Make note of the IP address (typically 192.168.99.100) | |
docker-machine env dev --shell cmd | |
# Copy/paste commands | |
docker build -t ismyrnow/my-container:1.0.0 . | |
docker run -di -p 8080:8080 ismyrnow/my-container:1.0.0 | |
# To access the shell of the container: | |
docker exec -it -u root *hash* bash |
A Node.js web server, with zero dependencies, which redirects all requests to a URL provided at runtime.
Useful for redirecting Elastic Beanstalk apps to a new location. Just deploy this as a new version, then set the REDIRECT
variable.
Run with node server http://google.com
or set REDIRECT=http://google.com && node server