git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
/// <summary> | |
/// Read more at: https://stackoverflow.com/a/14369695/375958 | |
/// </summary> | |
public static class HighResolutionDateTime | |
{ | |
private static long lastTimeStamp = DateTime.UtcNow.Ticks; | |
public static long UtcNowTicks | |
{ | |
get | |
{ |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
public static bool IsMobileNumber(this string value) | |
{ | |
return Regex.IsMatch(value ?? string.Empty, @"^((\+9|\+989|\+\+989|9|09|989|0989|00989)(01|02|03|10|11|12|13|14|15|16|17|18|19|20|21|22|30|31|32|33|34|35|36|37|38|39|90))(\d{7})$"); | |
} |
package com.gabesechan.android.reusable.receivers; | |
import java.util.Date; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.telephony.TelephonyManager; | |
public abstract class PhonecallReceiver extends BroadcastReceiver { |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace GithubWikiDoc | |
{ |
public class BotUserAgentUtility | |
{ | |
public static bool IsBot(string userAgent) | |
{ | |
var Crawlers = new List<string>() | |
{ | |
"googlebot","bingbot","yandexbot","ahrefsbot","msnbot","linkedinbot","exabot","compspybot", | |
"yesupbot","paperlibot","tweetmemebot","semrushbot","gigabot","voilabot","adsbot-google", | |
"botlink","alkalinebot","araybot","undrip bot","borg-bot","boxseabot","yodaobot","admedia bot", | |
"ezooms.bot","confuzzledbot","coolbot","internet cruiser robot","yolinkbot","diibot","musobot", |
function TimeSpan(seed) { | |
//"00:00:00" | |
var self = this; | |
self.hour = seed.substr(0, 2); | |
self.minute = seed.substr(3, 2); | |
self.second = seed.substr(6, 2); | |
self.addSecond = function () { | |
self.second++; | |
if (self.second >= 60) { |
--get most used tables | |
SELECT | |
db_name(ius.database_id) AS DatabaseName, | |
t.NAME AS TableName, | |
SUM(ius.user_seeks + ius.user_scans + ius.user_lookups) AS NbrTimesAccessed | |
FROM sys.dm_db_index_usage_stats ius | |
INNER JOIN sys.tables t ON t.OBJECT_ID = ius.object_id | |
WHERE database_id = DB_ID('MyDb') | |
GROUP BY database_id, t.name | |
ORDER BY SUM(ius.user_seeks + ius.user_scans + ius.user_lookups) DESC |
# Batch script to generate Open SSL self signed certificate | |
openssl req -new -x509 -nodes -newkey rsa:1024 -keyout webhook_pkey.key -out webhook_cert.pem -days 3650 | |
openssl pkcs12 -export -out newfile.pfx -inkey privcert.key -in pubcert.pem -certfile CARoots.pem |
public class Foo | |
{ | |
public void Method1() | |
{ | |
Console.WriteLine("Method1: this == null: {0}", this == null); | |
} | |
} | |
var m1 = typeof(Foo).GetMethod("Method1"); | |
var method1 = Delegate.CreateDelegate(typeof(Action<Foo>), m1) as Action<Foo>; |