Skip to content

Instantly share code, notes, and snippets.


Juyal Ahmed tojibon

View GitHub Profile
learncodeacademy / gist:5850f394342a5bfdbfa4
Last active Aug 26, 2021
SSH Basics - Getting started with Linux Server Administration
View gist:5850f394342a5bfdbfa4

###SSH into a remote machine###

#or by ip address
ssh user@

exit: exit ###Install Something###

#If it's a new server, update apt-get first thing
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';
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
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
ourmaninamsterdam / LICENSE
Last active Sep 15, 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:
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) {
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')
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"
View angular2.gitignore
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