Skip to content

Instantly share code, notes, and snippets.

View kingofnull's full-sized avatar
😪

The Lost Guy kingofnull

😪
View GitHub Profile
@kingofnull
kingofnull / add large files to git
Created July 9, 2022 04:28
Add large files to git
set GIT_CURL_VERBOSE=1
set GIT_TRACE=1
set GIT_TRACE_PACKET=0
git lfs install
git lfs track "*.exe"
git add .gitattributes
git add myfile.exe
git commit -m "Add a large file through LFS"
git push
@kingofnull
kingofnull / #nugetpkg_build_and_publish.bat
Last active June 6, 2022 08:00
NuGet package auto build dll and publish in Ms Windows and VS2019 using a batch file (set project name and api key then run it in project directory next to .csprj file)
@echo off
del *.nupkg
set API_KEY= <---API-KEY--->
set PRJ_FILE= <---Project-Name--->.csproj
REM nuget pack -Build "%PRJ_FILE%" -Symbols -IncludeReferencedProjects -properties Configuration=Release -Properties NoWarn=NU5128
nuget pack -Build "%PRJ_FILE%" -IncludeReferencedProjects -properties Configuration=Release -Properties NoWarn=NU5128
Nuget push *.nupkg -Source https://www.nuget.org/api/v2/package %API_KEY%
@kingofnull
kingofnull / How to auto version in visual studio for c# project.md
Last active May 29, 2022 07:21
How to auto version in visual studio for c# project (Tested in VS2019)
  1. Set Deterministic to false in .csproj file:

    <Deterministic>false</Deterministic>
  2. Change versioning in AssemblyInfo.cs to this:

    [assembly: AssemblyVersion("1.0.*")]
@kingofnull
kingofnull / Regex Capturing Group .cs
Last active May 14, 2022 16:29
C# Regex Capturing Group
var m = Regex.Match(data, @"[*D](?<num>\d+)[C#]");
if (m.Success)
{
var num = m.Groups["num"].Value;
Log($"New Phone Detected: {num}");
return;
}
@kingofnull
kingofnull / gist:39454103e78c91dad2a2c3b9b79d3931
Created December 17, 2021 17:53
Contexant Configuration Dump
AT&v
ACTIVE PROFILE:
B1 E1 L1 M1 N0 Q0 T V1 W0 X4 Y0 &C1 &D2 &G0 &J0 &K3 &Q5 &R1 &S0 &T5 &X0 &Y0
S00:000 S01:000 S02:043 S03:013 S04:010 S05:008 S06:003 S07:050 S08:001 S09:006
S10:014 S11:085 S12:050 S18:000 S25:005 S26:001 S36:007 S38:020 S46:138 S48:007
S95:000
STORED PROFILE 0:
B1 E1 L1 M1 N0 Q0 T V1 W0 X4 Y0 &C1 &D2 &G0 &J0 &K3 &Q5 &R1 &S0 &T5 &X0
S00:000 S02:043 S06:003 S07:050 S08:001 S09:006 S10:014 S11:085 S12:050 S18:000
@kingofnull
kingofnull / OracleQueryExecuter.cs
Last active October 28, 2021 08:01
A dynamic sql server query executer and result reader without using DTO for Oracle
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
namespace Toolkit.QueryExecuter
{
@kingofnull
kingofnull / SqlSrvQueryExecuter.cs
Last active October 28, 2021 08:02
A dynamic sql server query executer and result reader without using DTO for SQL Server
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace Toolkit.QueryExecuter
{
public class SqlSrvQueryExecuter
@kingofnull
kingofnull / launch.json
Last active December 13, 2020 10:24
VS Code launch config for react.js . source: https://stackoverflow.com/a/39607924
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch via NPM",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/src",
"runtimeExecutable": "npm",
"runtimeArgs": [
@kingofnull
kingofnull / IranUniversityList.json
Last active November 8, 2020 05:23
لیست نامه و برخی از اطلاعات از دانشگاه های ایران استخراج شده از ویکی پدیا به شکل JSON
[
{
"id": 1,
"type": "Dolati",
"title": "دانشگاه تهران",
"city": "تهران",
"website": "http://ut.ac.ir/"
},
{
"id": 2,
@kingofnull
kingofnull / simple-dd.php
Last active August 17, 2019 07:25
Simple PHP DD function var_dump and die replacement with reporting location and multiple input,
<?php
if(!function_exists('dd')){
function dd(){
$call=( debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS)[0]);
echo "<pre>\n### {$call['file']}:{$call['line']} ###\n";
call_user_func_array("var_dump",func_get_args()) ;die;
}
}