Skip to content

Instantly share code, notes, and snippets.

View ajai8085's full-sized avatar
🎯
Focusing

Ajai ajai8085

🎯
Focusing
View GitHub Profile
@manishtiwari25
manishtiwari25 / world_currency_symbols.json
Last active July 18, 2024 00:37
List Of Countries With States And Other Useful Information, Updated On 07/01/2024 00:08:48
[
{
"Flag": "",
"CountryName": "Andorra",
"Currency": "Euro Member Countries",
"Code": "EUR",
"Symbol": "\u20AC",
"SymbolImage": "https://www.xe.com/symbols-page/symbols/curSymbol8364.gif"
},
{
@kannansuresh
kannansuresh / Get Android phone call history.md
Last active June 4, 2024 10:10
Get Android phone call history/log programmatically

Source: AndroidDev

To get call history programmatically first add read contact permission in Manifest file:

<uses-permission android:name="android.permission.READ_CONTACTS" />

Create xml file. Add the below code in xml file:

<Linearlayout android:layout_height="fill_parent"
@ernestkamara
ernestkamara / AdbCommands
Created June 26, 2018 08:42 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@DanielSWolf
DanielSWolf / Program.cs
Last active July 16, 2024 20:29
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@benhysell
benhysell / DatabaseCall.cs
Last active May 14, 2024 02:59
c# Redis Caching Objects with StackExchange.Redis using Json
//extension method make a database call by providing a function pointer to Task<T> and passing in a method parameter
public static async Task<T> DatabaseCall<T>(this IDatabase cache, string key, Func<string, Task<T>> databaseCall, string methodParameter, TimeSpan timeSpan, bool invalidate, bool useCache)
{
T returnValue;
var cachedItem = default(T);
try
{
cachedItem = await cache.GetAsync<T>(key);
}
catch (RedisConnectionException ex)
@learncodeacademy
learncodeacademy / gist:5f84705f2229f14d758d
Last active July 16, 2024 04:56
Getting Started with Vagrant, SSH & Linux Server Administration
@joey-qc
joey-qc / TSQL-to-POCO
Created September 26, 2013 06:56
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR