Skip to content

Instantly share code, notes, and snippets.

View nzhul's full-sized avatar
Power Overwhelming!

Dobromir Ivanov nzhul

Power Overwhelming!
View GitHub Profile
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using System.Threading.Tasks;
namespace Common.SqlServer.BulkOperations
{
@nzhul
nzhul / gist:eda6bd6642c8915dcd7a5ef0390cec51
Created April 28, 2018 07:13
VS Code extensions list
angular v5 snippets
angular files
angular language service
brackets pair colorizer
material icon theme
path intellisense
tslint
nuget package manager
Debugger for chrome
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
namespace CorePlayground
{
public class Album
{
@nzhul
nzhul / Pagination.cshtml
Created February 23, 2017 12:04
Collapsing Pager
@using Web.Widgets.Search.Mvc.Models.View;
@model PagingData
<ul class="pagination">
@if (Model.DisplayPrev)
{
<li><a class="prev-page-url" href="@Model.PrevUrl">Previous</a></li>
}
------------- GenerateForumsSpamProtectionNuGetPackages.ps1 ---------------
[CmdletBinding()]
Param(
[alias("sln")]
$slnName = "Web.SitefinityModules.PublishingExtender",
[alias("slnDir")]
$slnDirectory = $null,
[alias("outDir")]
$outputDir = "C:\LEAN\local-nuget-repository",
[alias("projects")]
@nzhul
nzhul / deleteBinariesFolders.ps1
Created November 8, 2016 07:54
Powershell script that can be used to delete all binary files recursively
param (
[string]$path = $(Read-Host "Path to folder")
)
$foldersToDelete = Get-ChildItem -Path $path -Recurse -Name "bin" -Directory | %{ Join-Path -Path $path -ChildPath $_.ToString() }
Remove-Item $foldersToDelete -Recurse -Confirm:$false
#Write-Host $foldersToDelete
@nzhul
nzhul / WebSocketsWithFleck.cs
Last active March 23, 2022 04:35
Example of simple WebSockets server using Fleck
// Javascript example
$(function(){
var webSocket = window.WebSocket || window.MozWebSocket,
ws = new webSocket('ws://localhost:8181');
ws.onopen = function(e){
console.log('Connection opened');
}
@nzhul
nzhul / Unity3DEventManager.cs
Created July 5, 2016 15:40
Pseudo code for Unity3d EventManager. Basically this is implementation of Observer pattern but with some twists for Unity3d
using System;
using System.Collections.Generic;
namespace EventManager
{
public class EventManager
{
private static EventManager instance = null;
public static EventManager Instance
{
using System;
using System.Net;
using System.Text;
using System.Threading;
namespace WebPageWatcher
{
public class Program
{
public static State state;
@nzhul
nzhul / LayersToPNG.jsx
Created January 26, 2016 23:09
Spine 2D - LayersToPNG.jsx fix for Photoshop CC
// This script exports photoshop layers as individual PNGs. It also
// writes a JSON file that can be imported into Spine where the images
// will be displayed in the same positions and draw order.
// Setting defaults.
var writePngs = true;
var writeTemplate = false;
var writeJson = true;
var ignoreHiddenLayers = true;
var pngScale = 1;