Skip to content

Instantly share code, notes, and snippets.

@jalal
jalal / datadown.sh
Created January 15, 2014 12:23
Shell script used to pull down the remote database and install it to the local machine.
#!/bin/bash
#
SSHSTR=user@domain.net
REMOTEDB=usrdb_name
REMOTEUSER=usrdb_username
REMOTEPASS=secretpassword
LOCALDB=$REMOTEDB
LOCALUSER=
LOCALPASS=
LOCAL1=$REMOTEDB-`date +"%Y%m%d"`.sql
@jalal
jalal / brute_force_block
Created March 26, 2014 14:57
Short piece of Apache config to stop Wordpress brute force login attempts (for .htaccess)
# added by jalal to stop brute force login attempts
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .(wp-comments-post|wp-login)\.php*
RewriteCond %{HTTP_REFERER} !.*domain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
# end brute force handling
@jalal
jalal / CSS-Timeline-Vertical.markdown
Last active May 16, 2017 08:27
A Pen by jalal (Tim Pushman).
@jalal
jalal / countdown.js
Created February 3, 2015 18:14
JS Countdown timer
var target = document.getElementById('target');
var current = document.getElementById('current');
var d = new Date();
current.innerHTML = "Now: " + d;
var opening = new Date(d.getFullYear(), d.getMonth(), d.getDate(), '16', '00', '00');
var closing = new Date(d.getFullYear(), d.getMonth(), d.getDate(), '22', '00', '00');
target.innerHTML = "Open: " + opening;
var el = document.getElementById('result');
@jalal
jalal / .gitignore
Created February 5, 2017 16:38
Nativescript .gitignore file
npm-debug.log
.DS_Store
*.js.map
*.metadata.json
app/**/*.js
npm-debug.log
hooks/
lib/
@jalal
jalal / keybase.md
Created June 27, 2018 14:26
keybase.md

Keybase proof

I hereby claim:

  • I am jalal on github.
  • I am jalalski (https://keybase.io/jalalski) on keybase.
  • I have a public key ASCAs0FT4m-bfDs_q7LPmGI5s-eOXMajvVWgWRJKcTsuDAo

To claim this, I am signing this object: