Skip to content

Instantly share code, notes, and snippets.

View ahangarha's full-sized avatar

Mostafa Ahangarha ahangarha

View GitHub Profile
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here:
sae13 /
Last active November 30, 2018 18:04
Download and install Saber rastikerdar fonts in Linux Distros
#Saber RastikerdarBlog:
which unzip >/dev/null 2>&1
if [ $? -ne 0 ];then
echo "You Need Install unzip package"
which wget >/dev/null 2>&1
if [ $? -ne 0 ];then
@font-face {
font-family: Vazir;
src: url('') format('woff');
@font-face {
font-family: Samim;
src: url('') format('woff');
mohandere / yoast-seo-sitemap.php
Last active February 4, 2024 04:58
Wordpress yoast seo plugin, generate custom sitemap for custom URLS
* Create a new custom yoast seo sitemap
add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' );
add_action( 'init', 'init_wpseo_do_sitemap_actions' );
// Add custom index
anchetaWern /
Created August 4, 2013 13:18
web scraping in php

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}

willurd /
Last active June 7, 2024 03:53
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit