Skip to content

Instantly share code, notes, and snippets.


Juyal Ahmed tojibon

View GitHub Profile
View app.dockerfile
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
tojibon /
Created Dec 15, 2016
Installing Spring STS or Eclipse IDE on Linux Mint 18 "Sarah"
  1. Download latests
  2. Rename the extracted bundle as "springsource"
  3. sudo mv springsource /opt
  4. sudo chown -R root:root /opt/springsource
  5. sudo chmod -R +r /opt/springsource
  6. sudo cp /opt/springsource/sts-3.8.2.RELEASE/icon.xpm /usr/share/pixmaps/sts.xpm [Your version can be different]
  7. sudo touch /usr/share/applications/sts.desktop<<EOF [Desktop Entry] Encoding=UTF-8 Name=Spring IDE
View angular2.gitignore
View webpack.config.js
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"
mikermcneil / query-multiple-models-in-sails-controller-action.js
Created Sep 16, 2015
Querying multiple models from a controller action in Sails
View query-multiple-models-in-sails-controller-action.js
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.
id: req.param('id')
tojibon / custom.js
Created Sep 2, 2015
Custom module for you to write your own javascript functions
View custom.js
Custom module for you to write your own javascript functions
var Custom = function () {
// private functions & variables
var myFunc = function(text) {
ourmaninamsterdam / LICENSE
Last active Jul 31, 2021
Arrayzing - The JavaScript array cheatsheet
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:
rjmacarthy / Client.js
Last active Oct 13, 2015
Sails.js Configuration
View Client.js
socket = io.connect();
socket.on('connect', function socketConnected() {
socket.on('sockets', function newMessageFromSails ( data ) {
console.log(data); // Data from socket
butlerblog / auto-login-from-reg-email.php
Last active Feb 24, 2021
WordPress auto login from native registration email
View auto-login-from-reg-email.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
hasinhayder / envato-screenshots-downloader.php
Last active Nov 14, 2017
Download large preview images from the envato item's screenshots page
View envato-screenshots-downloader.php
#!/usr/bin/env php
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page
$dir = $argv[1];
$source = $argv[2];
mkdir ($dir);
$src = file_get_contents($source);
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i';