I hereby claim:
- I am amiraliakbari on github.
- I am amirali (https://keybase.io/amirali) on keybase.
- I have a public key ASAt67tVKyA6SZOfPurVv0F7SS0j9Qo7kQlOhmfcNiPv9go
To claim this, I am signing this object:
pragma solidity ^0.5.0; | |
/** | |
* SPDX-License-Identifier: UNLICENSED | |
*/ | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that revert on error | |
*/ | |
library SafeMath { |
// Iranian keyboard layout | |
// Replace with "/usr/share/X11/xkb/symbols/ir" | |
// Customized Version | |
//////////////////////////////////////// | |
// Persian layout, | |
// based on | |
// Information Technology – Layout of Persian Letters and Symbols on Computer Keyboards | |
// ISIRI 9147 – 1st Edition |
# -*- coding: utf-8 -*- | |
""" | |
SMS Service Module | |
==================== | |
Utilities to easily send sms using any service provider | |
usage: | |
>>> from commons.sms.sms_service import Sms, SmsService | |
>>> sms_ir = SmsService('sms.ir', '30000958', 'username', 'pass') | |
>>> sms_ir.send_sms(Sms(to='09122132796', message=u'Hello World!')) |
class Member(AbstractUser): | |
GENDER = Choices((1, 'male', u"مرد"), (2, 'female', u"زن")) | |
image = models.ImageField(verbose_name=u"عکس", null=True, blank=True) | |
city = models.ForeignKey(City, null=True, blank=True, verbose_name=u"شهر") | |
gender = models.PositiveSmallIntegerField(verbose_name=u"جنسیت", choices=GENDER, null=True, blank=True) | |
default_page = models.ForeignKey('network.Page', null=True, blank=True, verbose_name=u"صفحه پیش فرض", | |
related_name="member_default_page") | |
settings = models.ForeignKey('MemberSettings', name='settings', null=True, blank=True) | |
birth_date = models.DateField(null=True, blank=True, verbose_name=u'تولد') |
static void gather_stats(const char *buf, unsigned long size, struct text_stat *stats) | |
{ | |
unsigned long i; | |
memset(stats, 0, sizeof(*stats)); | |
for (i = 0; i < size; i++) { | |
unsigned char c = buf[i]; | |
if (c == '\r') { | |
stats->cr++; |
#!/bin/bash | |
# Initial version forked from: https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_9.sh | |
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.9" |
package livedoc.utils; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
public class Logger { |
@font-face { | |
font-family: 'IRANSans'; | |
src : url("https://ir-cloud.ir/fonts/IRANSansFaNum/eot/IRANSansWeb(FaNum).eot"), url('https://ir-cloud.ir/fonts/IRANSansFaNum/woff/IRANSansWeb(FaNum).woff') format('woff'), url('https://ir-cloud.ir/fonts/IRANSansFaNum/ttf/IRANSansWeb(FaNum).ttf') format('truetype'), url("https://ir-cloud.ir/fonts/IRANSansFaNum/woff2/IRANSansWeb(FaNum).woff2") format('woff2'); | |
} | |
.c-message { | |
font-family: 'IRANSans', 'B Nazanin'; | |
} | |
.c-message__content { |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Proxy auto configuration file for accessing sites blocked in Iran due to | |
* sanctons or filtering. To use, a socks5 proxy must be running and accessible | |
* on localhost port 1080. Set url of this gist in "Automatic proxy configuration URL" | |
* field in "Network Proxy Settings" in Firefox. | |
*/ | |
function FindProxyForURL(url, host) { | |
var blockedHosts = [ | |
'twitter.com', 'twimg.com', // Twitter |