###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
#!/usr/bin/env php | |
<?php | |
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page | |
set_time_limit(0); | |
$dir = $argv[1]; | |
$source = $argv[2]; | |
print_r($argv); | |
mkdir ($dir); | |
$src = file_get_contents($source); | |
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i'; |
<?php | |
/* | |
This code snippet can be added to your functions.php file (without the <?php) | |
to add a query string to the login link emailed to the user upon registration | |
which when clicked will validate the user, log them in, and direct them to | |
the home page. | |
*/ | |
/** | |
* This first function is hooked to the 'user_register' action which fires |
socket = io.connect(); | |
socket.on('connect', function socketConnected() { | |
socket.on('sockets', function newMessageFromSails ( data ) { | |
console.log(data); // Data from socket | |
}); | |
}); |
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
/** | |
Custom module for you to write your own javascript functions | |
**/ | |
var Custom = function () { | |
// private functions & variables | |
var myFunc = function(text) { | |
alert(text); | |
} |
//... | |
showSchoolDetailPage: function (req, res) { | |
if (!req.param('id')) { | |
return res.badRequest('The id of the school (`id`) is a required parameter!'); | |
} | |
// Look up the school, it's associated image, and the associated list of students. | |
School.findOne({ | |
id: req.param('id') |
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
typings | |
app/**/*.js | |
app/**/*.map | |
node_modules | |
jspm_packages | |
bower_components |