Skip to content

Instantly share code, notes, and snippets.


Muhammad Sumon Molla Selim SumonMSelim

View GitHub Profile
shahariaazam / ZIPMaker.php
Created Feb 3, 2013
Create .ZIP archive in PHP
View ZIPMaker.php
* @Author Shaharia Azam
* @Author URL
* @Description this function will make a .zip folder by adding multiple files.
* @link
* @param array $SourceFiles
* @param string $ZipDestination
masnun /
Created Mar 5, 2016
Facebook Top Likers
import facebook
from collections import Counter
import requests
likes_counter = Counter()
# Get temp tokens at:
client = facebook.GraphAPI(access_token=USER_ACCESS_TOKEN, version='2.5')
suwardany /
Last active Apr 29, 2016
Setup a blog extension with Cartalyst Platform 2

Setup a blog extension with Cartalyst Platform 2

Download Platform

git clone blog

Install Dependencies

Navigate into the downloaded folder and run

View string_replace_callback_solution.php
$template =[
'@name@' => [
'User name',
'@email@' => [
from StringIO import StringIO
from openpyxl import Workbook
from openpyxl.compat import range
from openpyxl.cell import get_column_letter
from openpyxl.styles import Style, Font
def make_excel(dataset,
key_headers=None, # The order of attributes, or what to include
line_headers=None, # The order of table attributes, or what to include
import requests
from BeautifulSoup import BeautifulSoup as BS
import re
def get_dl_page(package_id):
get_request = requests.get('' + package_id)
page = BS(get_request.text)
# it is assumed that the first search result is the thing we are looking for
link_ps = page.findAll('p', {'class': 'search-title'})
page_link = link_ps[0].a.get('href')
leninhasda /
Created Dec 3, 2016
utility script to automatically move the specified files from downloads directory to proper directory
# import
import os
from os import path, listdir as list_dir, rename as move
from os.path import isdir as is_dir, isfile as is_file
from pprint import pprint
import shutil
# global variables
View Form::delete macro
| Delete form macro
| This macro creates a form with only a submit button.
| We'll use it to generate forms that will post to a certain url with the DELETE method,
| following REST principles.
View MakeAllCommand.php
<?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class MakeAll extends Command
* The name and signature of the console command.
View gist:aa425a4d3e37665c5c6a1e812c76b5cd
// define route like this
//make a function like below in your helper file
function Replace($data) {
$data = str_replace("'", "", $data);
$data = str_replace("!", "", $data);
$data = str_replace("@", "", $data);
$data = str_replace("#", "", $data);