Skip to content

Instantly share code, notes, and snippets.

View azizur's full-sized avatar

Azizur Rahman azizur

View GitHub Profile
@azizur
azizur / Producteev User - Notice of Data Breach
Created September 23, 2016 22:02
Producteev User - Notice of Data Breach
Delivered-To: EMAIL_ADDRESS_REMOVED
Received: by 10.80.165.111 with SMTP id z44csp568758edb;
Fri, 23 Sep 2016 14:34:47 -0700 (PDT)
X-Received: by 10.36.111.199 with SMTP id x190mr5908699itb.61.1474666487030;
Fri, 23 Sep 2016 14:34:47 -0700 (PDT)
Return-Path: <bounces+256423-f6c7-USER_REMOVED=DOAMIN_REMOVED@emailapp.producteev.com>
Received: from o1.emailapp.producteev.com (o1.emailapp.producteev.com. [50.31.50.134])
by mx.google.com with ESMTPS id j185si11543537iof.9.2016.09.23.14.34.46
for <EMAIL_ADDRESS_REMOVED>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby --trace --auto-dotfiles
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active March 26, 2024 18:32
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
\curl -sSL https://get.rvm.io | bash -s stable --ruby --autolibs=enabled --auto-dotfiles
#!/bin/sh
#
# Adam Sharp
# Aug 21, 2013
#
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
#
# Change to a directory that’s in your PATH, I used /usr/local/bin and run the following commands:
#
# $ curl -o git-remove-submodule https://gist.githubusercontent.com/azizur/10c814ae16a9d75d4e42/raw/fa7b5e9c30a0118d51625dd038e363aceefd382c/git-remove-submodule
@azizur
azizur / extract-links-into-csv.js
Last active August 29, 2015 14:05
Extract links from web page into a CSV format
http://www.youtube.com/watch?v=2uMiYldg0LU&noredirect=1
500 Internal Server Error
Sorry, something went wrong.
A team of highly trained monkeys has been dispatched to deal with this situation.
If you see them, show them this information:
AB38WEN8NI9ZvD0GD9aYE5IKZHnBiKQ_f8QQu07rMQXXbEIZc4wwubF-_bRS
@azizur
azizur / create-wp-admin-account.sql
Last active September 28, 2021 15:39
Create a WordPress Administrator user account using SQL
USE __DATABASE__;
SET @username = 'azizur';
SET @password = MD5('password');
SET @fullname = 'Azizur Rahman';
SET @email = 'azizur@example.com';
SET @url = 'http://azizur.com/';
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname);
@azizur
azizur / aeromaxx-parse-request.php
Created August 23, 2012 22:52 — forked from mikeschinkel/aeromaxx-parse-request.php
WordPress URLs for 1 taxonomy on 2 different custom post types
<?php
/**
* Answering: http://lists.automattic.com/pipermail/wp-hackers/2012-August/044119.html
* By: Mike Schinkel - http://about.me/mikeschinkel
*/
add_action( 'parse_request', 'aeromaxx_parse_request' );
function aeromaxx_parse_request( $wp ) {
if ( preg_match( '#^/(draw-results|ball-statistics)/game/([^/]+)/#', $_SERVER['REQUEST_URI'], $matches ) ) {
$wp->query_vars = array(
'post_type' => $matches[1], // Assumes your post types are registered with same name as your URL slugs
@azizur
azizur / README.md
Created August 6, 2012 00:09 — forked from aronwoost/README.md
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI