Skip to content

Instantly share code, notes, and snippets.

View itskawsar's full-sized avatar
🏠
Working from home

Kawsar Ahmad itskawsar

🏠
Working from home
  • Dhaka, Bangladesh
View GitHub Profile
@seanmcn
seanmcn / gist:62a021a765ad4f8e593b
Last active February 21, 2024 11:57
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@hasinhayder
hasinhayder / envato-screenshots-downloader.php
Last active November 14, 2017 18:37
Download large preview images from the envato item's screenshots page
#!/usr/bin/env php
<?php
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page
set_time_limit(0);
$dir = $argv[1];
$source = $argv[2];
print_r($argv);
mkdir ($dir);
$src = file_get_contents($source);
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i';
@taylorruizchiu
taylorruizchiu / js_frameworks_comparison.md
Last active May 30, 2020 20:27
Javascript Frameworks: Angular vs. Meteor vs. Backbone

Javascript Frameworks: What's the difference?

Meteor vs. Angular vs. Backbone

All frameworks are not created equal...but what really is the difference? And when should I use which one?

All the things

An awesome site to compare all the codes:

todomvc.com

@cdillon
cdillon / gist:31b4ccc4185dbd4b778b
Last active May 10, 2016 12:35
example of a custom form in WordPress using math Captcha plugin by BestWebSoft
// shortcode: [demo-form]
function demo_form_shortcode( $atts ) {
$name = '';
$email = '';
$company = '';
$errors = array();
if ( isset( $_POST['demo_form_submitted'] )
@tchebb
tchebb / readykommerce-filter-fix.patch
Created March 12, 2014 17:16
A patch to fix the incorrect filter behavior of the "MailChimp Multiple Newsletter Signup" WordPress plugin.
diff -ru readykommerce-multi-newsletter-signup-light-orig/nl_signup.php readykommerce-multi-newsletter-signup-light/nl_signup.php
--- readykommerce-multi-newsletter-signup-light-orig/nl_signup.php 2014-02-13 09:40:23.000000000 -0500
+++ readykommerce-multi-newsletter-signup-light/nl_signup.php 2014-03-12 12:58:08.000000000 -0400
@@ -278,13 +278,13 @@
// If is the home page, an archive, or search results
if(is_front_page() || is_archive() || is_search() || is_single() || is_page()) :
global $post;
- // $content = $post->post_excerpt;
+
$file = get_post_meta( $post->ID, 'nl_file_upload', true );
@font-face {
font-family: 'EntypoRegular';
src: url('font/entypo.eot');
src: url('font/entypo.eot?#iefix') format('embedded-opentype'),
url('font/entypo.woff') format('woff'),
url('font/entypo.ttf') format('truetype'),
url('font/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@bueltge
bueltge / post-process.php
Created June 24, 2011 21:08
WordPress Custom Post Type: Insert post via Frontend
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']