This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.postgresql.org/docs/14/lo-funcs.html | |
INSERT INTO image (name, raster) | |
VALUES ('rich_python', lo_import('/Users/dsk/Downloads/rich_python.png')); | |
SELECT lo_export(image.raster, '/Users/dsk/Downloads/lo_export/rich_python1.png') FROM image | |
WHERE name = 'rich_python'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# brew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# nodejs | |
brew install node | |
# bower | |
npm install -g bower | |
# python 3 | |
brew install python3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
free_email_domains_list=["gmail.com","googlemail.com","gmx.com", "aol.com", "att.net", "comcast.net", "facebook.com","hotmail.com","hotmail.fr","hotmail.co.uk","hotmail.de","hotmail.be","hotmail.com.ar","hotmail.es", "hotmail.com.mx","live.com","live.co.uk", "live.fr","live.de","live.be","live.com.ar","live.com.mx","msn.com", "outlook.com", "ymail.com","yahoo.com.ar", "yahoo.com.au", "yahoo.at", "yahoo.be", "yahoo.fr", "yahoo.be","yahoo.nl", "yahoo.com.br", "ca.yahoo.com", "qc.yahoo.com", "yahoo.com.co", "yahoo.com.hr", "yahoo.cz", "yahoo.dk", "yahoo.fi", "yahoo.fr", "yahoo.de", "yahoo.gr", "yahoo.com.hk", "yahoo.hu", "yahoo.co.in","yahoo.in", "yahoo.co.id", "yahoo.ie", "yahoo.co.il", "yahoo.it", "yahoo.co.jp", "yahoo.com.my", "yahoo.com.mx", "yahoo.ae", "yahoo.nl", "yahoo.co.nz", "yahoo.no", "yahoo.com.ph", "yahoo.pl", "yahoo.pt", "yahoo.ro", "yahoo.ru", "yahoo.com.sg", "yahoo.co.za", "yahoo.es", "yahoo.se", "yahoo.ch","yahoo.fr","yahoo.de", "yahoo.com.tw", "yahoo.co.th", "yahoo.com.tr", "yahoo.co.uk", "yaho |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Table prefix: " | |
read -e tableprefix | |
echo "Database User: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def avgSumOfSquares(): | |
enter_input = True | |
number = "" | |
number_list = [] | |
while enter_input: | |
number = raw_input("Enter next number:") | |
print number | |
if number == "end": | |
enter_input = False | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function findTimeAgo($past, $now = "now") { | |
// sets the default timezone if required | |
// list of supported timezone identifiers | |
// http://php.net/manual/en/timezones.php | |
// date_default_timezone_set("Asia/Calcutta"); | |
$secondsPerMinute = 60; | |
$secondsPerHour = 3600; | |
$secondsPerDay = 86400; | |
$secondsPerMonth = 2592000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0815.ru | |
0wnd.net | |
0wnd.org | |
10minutemail.co.za | |
10minutemail.com | |
123-m.com | |
1fsdfdsfsdf.tk | |
1pad.de | |
20minutemail.com | |
21cn.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.idiotinside.com/2015/02/13/get-number-of-likes-of-a-facebook-page-using-graph-api-in-python/ | |
import urllib2 | |
import json | |
def get_page_data(page_id,access_token): | |
api_endpoint = "https://graph.facebook.com/v2.4/" | |
fb_graph_url = api_endpoint+page_id+"?fields=id,name,likes,link&access_token="+access_token | |
try: | |
api_request = urllib2.Request(fb_graph_url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Tutorial : http://www.idiotinside.com/2015/02/05/find-geolocation-of-an-ip-address-using-php-and-python/ | |
$ipAddress = "IP_ADDRESS"; | |
$ip_key = "YOUR_API_KEY"; | |
$query = "http://api.ipinfodb.com/v3/ip-city/?key=" . $ip_key . "&ip=" . $ipAddress . "&format=json"; | |
$json = file_get_contents($query); | |
$data = json_decode($json, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function verifyEmail($toemail, $fromemail, $getdetails = false){ | |
$email_arr = explode("@", $toemail); | |
$domain = array_slice($email_arr, -1); | |
$domain = $domain[0]; | |
// Trim [ and ] from beginning and end of domain string, respectively | |
$domain = ltrim($domain, "["); | |
$domain = rtrim($domain, "]"); | |
if( "IPv6:" == substr($domain, 0, strlen("IPv6:")) ) { |
NewerOlder