Skip to content

Instantly share code, notes, and snippets.

View akrisiun's full-sized avatar

Andrius K akrisiun

View GitHub Profile
<template>
<div id="burger" :class="{
'active': active
}" @click="toggleActive">
<button type="button" class="burger-button" title="Menu">
<span class="burger-bar burger-bar--1"></span>
<span class="burger-bar burger-bar--2"></span>
<span class="burger-bar burger-bar--3"></span>
</button>
</div>
@akrisiun
akrisiun / Install_gitflow_on_Windows.md
Created February 17, 2020 12:56 — forked from ilyar/Install_gitflow_on_Windows.md
Install gitflow on Windows

Install gitflow on Windows

Download and install Git from MSysGit or Git SCM. Download and install getopt.exe from the util-linux package into C:\Program Files\Git\bin. (Only getopt.exe, the others util-linux files are not used). Also install libintl3.dll and libiconv2.dll from the Dependencies packages (libintl and libiconv), into the same directory.

Suppose that Git is installed in the folder c:\bin\git and GnuWin32 in the folder c:\bin\GnuWin32.

Clone the git-flow sources from GitHub:

$ git clone --recursive https://github.com/nvie/gitflow.git
@akrisiun
akrisiun / tips_lsof.sh
Last active January 24, 2023 18:00 — forked from tianchaijz/tips_lsof.sh
Shell command lsof : see open files and ports; Selection is OR by default, use -a for AND; Tested on OSX
# filter LISTEN - faster variant
lsof -anP -i4 -sTCP:LISTEN
# exclude UDP
lsof -anP -i4 -sTCP:LISTEN | grep TCP
# lsof with ports sort:
lsof -anP -i4 -sTCP:LISTEN | grep -v UDP | awk {'printf("%18s %-12s %8s %s %s %s\n", $9,$1,$2,$4,$3,$10)'} | sort -u
# docker-ps
@Velniai
Velniai / Indexes Usage Stats.sql
Last active September 16, 2019 05:36
[Index Maintainance] #sql #index #dmv
DECLARE @TableName VARCHAR(20) = NULL
SELECT TableName = OBJECT_NAME(S.object_id),
IndexName = I.name,
UserSeeks = S.user_seeks,
UserScans = S.user_scans,
UserLookups = S.user_lookups,
UserUpdates = S.user_updates ,
IsPrimaryKey = i.is_primary_key
FROM sys.dm_db_index_usage_stats S
using System;
using NUnit.Framework;
using NUnit.Framework.Interfaces;
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
public sealed class WaitForAmbientTasksAttribute : Attribute, ITestAction
{
public ActionTargets Targets => ActionTargets.Test;
public void BeforeTest(ITest test)
@jochemstoel
jochemstoel / native jQuery methods.js
Last active November 9, 2023 15:53
Vanilla implementations of commonly used jQuery methods.
/**
* Convenient shortcut
*/
Object.defineProperty(window, 'define', {
value: (property, ...meta) => meta.length == 2 ? Object.defineProperty(meta[0], property, meta[1]) : Object.defineProperty(window, property, meta[0]),
writable: false,
enumerable: true
})
@davidgilbertson
davidgilbertson / http2.js
Last active October 9, 2023 06:09
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};
@rbiggs
rbiggs / .json
Created September 3, 2018 08:21
NPM script to run TypeScript type checker against Javascript code with JSDoc comments.
"scripts": {
"checkjs": "tsc --allowJs --checkJs --noEmit --target ES5 src/*.js"
}
@dalion619
dalion619 / TemplateServiceConfiguration
Created August 26, 2018 18:17
RazorEngine TemplateServiceConfiguration
// Path needed for the ability to call this project in an ASP.NET project.
var codeBase = Assembly.GetExecutingAssembly().CodeBase;
var codeBaseUri = new UriBuilder(codeBase);
var uriPath = Uri.UnescapeDataString(codeBaseUri.Path);
var dirPath = Path.GetDirectoryName(uriPath);
// ResolvePathTemplateManager with no caching.
_razorEngineService = RazorEngine.Templating.RazorEngineService.Create(new TemplateServiceConfiguration
{
TemplateManager = new ResolvePathTemplateManager(new[]
@akrisiun
akrisiun / vue-datatables-example.html
Created August 8, 2018 11:06 — forked from bseib/vue-datatables-example.html
Vue + DataTables + load once
<!DOCTYPE html>
<html>
<head>
<title>Example Vue + DataTables</title>
<!-- I happened to be using the bootstrap styling w/ DataTables. You may not need this. -->
<link rel="stylesheet" href="/path/to/datatables/DataTables-1.10.16/css/dataTables.bootstrap4.min.css">
</head>
<body>
<div id="example-page">