- Download https://spring.io/tools latests
- Rename the extracted bundle as "springsource"
- sudo mv springsource /opt
- sudo chown -R root:root /opt/springsource
- sudo chmod -R +r /opt/springsource
- sudo cp /opt/springsource/sts-3.8.2.RELEASE/icon.xpm /usr/share/pixmaps/sts.xpm [Your version can be different]
- sudo touch /usr/share/applications/sts.desktop<<EOF [Desktop Entry] Encoding=UTF-8 Name=Spring IDE
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
FROM php:7.0.4-fpm | |
RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
mysql-client libmagickwand-dev --no-install-recommends \ | |
&& pecl install imagick \ | |
&& docker-php-ext-enable imagick \ | |
&& docker-php-ext-install mcrypt pdo_mysql |
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
typings | |
app/**/*.js | |
app/**/*.map | |
node_modules | |
jspm_packages | |
bower_components |
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
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" |
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
//... | |
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') |
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
/** | |
Custom module for you to write your own javascript functions | |
**/ | |
var Custom = function () { | |
// private functions & variables | |
var myFunc = function(text) { | |
alert(text); | |
} |
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
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: |
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
socket = io.connect(); | |
socket.on('connect', function socketConnected() { | |
socket.on('sockets', function newMessageFromSails ( data ) { | |
console.log(data); // Data from socket | |
}); | |
}); |
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 | |
/* | |
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 |
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
#!/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'; |