Skip to content

Instantly share code, notes, and snippets.

View ahmad-mushtaq's full-sized avatar

Ahmad Mushtaq ahmad-mushtaq

View GitHub Profile
@ahmad-mushtaq
ahmad-mushtaq / Readme.md
Last active April 3, 2020 18:00 — forked from petertwise/wp-cli-oneclick-install.sh
Setup Wordpress Automatically after creating a virtual server using VirtualMin

Setup Wordpress Automatically after creating a virtual server using VirtualMin

This is a bash script to create a Wordpress Site ready to be developed after creating a Virtual Server using VirtualMin

This is very helpful for me since most of websites we develop are using wordpress and there is so many repetetive tasks that we can automate and save a lot of time.

I am still not able to automate some stuff such as downloading WPML directly from the official website and generating a site key. If someonne can do it that would be great.

Resources

Edit (as root) /etc/ssh/sshd_config. Append the following to it:
Port 1234
PermitRootLogin no
AllowUsers jim
Port 1234 causes SSH to listen on port 1234. You can use any unused port from 1 to 65535. It's recommended to choose a privileged port (port 1-1024) which can only be used by root. If your SSH daemon stops working for some reason, a rogue application can't intercept the connection. PermitRootLogin disallows direct root login. AllowUsers jim allows user jim to login through SSH. If you do not have to login from everywhere, you can make this more secure by restricting jim to an IP address (replace 1.2.3.4 with your actual IP address): AllowUsers jim@1.2.3.4 Changes to the configuration file /etc/ssh/sshd_config are not immediately applied, to reload the configuration, run: sudo service ssh reload
@ahmad-mushtaq
ahmad-mushtaq / javascript_resources.md
Last active August 29, 2015 14:15 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@ahmad-mushtaq
ahmad-mushtaq / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console