Skip to content

Instantly share code, notes, and snippets.

Avatar

Heri Sim heri16

View GitHub Profile
@revskill10
revskill10 / accounting.sql
Last active Apr 15, 2022 — forked from 001101/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
View accounting.sql
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL,
parent_id INTEGER REFERENCES section,
parent_path LTREE
);
CREATE INDEX account_parent_path_idx ON accounts USING GIST (parent_path);
CREATE INDEX account_parent_id_idx ON accounts (parent_id);
@jsakhil
jsakhil / Online KMS Activator.cmd
Created Aug 10, 2019 — forked from bhandarisaurav/Online KMS Activator.cmd
Activate Windows & Office for 180 Days with online KMS Servers. This script does not install any files in your system and it clears all the leftovers including kms server name after the Activation. For Successful Activation, Internet Must be connected.
View Online KMS Activator.cmd
@echo off
::::::::::::::::::::::::::::
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
:GotPrivileges
::::::::::::::::::::::::::::
color 1F
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active Nov 28, 2021
Benchmarking & load testing tools
View benchmarking-tools.md
@realoriginal
realoriginal / windows10activation
Created Oct 8, 2018 — forked from amanjuman/windows10activation
Activate Windows 10 without Any Activator
View windows10activation
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
@druska
druska / engine.c
Created Sep 17, 2018
Quant Cup 1's winning order book implementation
View engine.c
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@NYKevin
NYKevin / accounting.sql
Last active Apr 25, 2022
Basic double-entry bookkeeping system, for PostgreSQL.
View accounting.sql
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...
@ynaoto
ynaoto / gist:5228280
Last active Jun 21, 2017
Install 'mosh' to CentOS 6
View gist:5228280
rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install mosh –enablerepo=epel
@anacrolix
anacrolix / striter.py
Created Sep 26, 2012
A Python IO class wrapping an iterable of strings.
View striter.py
import io
class StringIteratorIO(io.TextIOBase):
def __init__(self, iter):
self._iter = iter
self._left = ''
def readable(self):
return True
@EkremGungormez
EkremGungormez / gist:2724210
Created May 18, 2012
abap inner join example
View gist:2724210
TABLES: MKPF,
MSEG.
DATA: BEGIN OF gs_ara,
mblnr type mkpf-mblnr,
mjahr TYPE mkpf-mjahr,
budat TYPE mkpf-budat,
tcode2 TYPE mkpf-tcode2,
usnam TYPE mkpf-usnam,
cpudt TYPE mkpf-cpudt,
@idavis
idavis / Use-Impersonation.ps1
Created Mar 5, 2011
Impersonate a user and execute a script block as that user
View Use-Impersonation.ps1
param( [ScriptBlock] $scriptBlock )
<#
.SYNOPSIS
Impersonates a user and executes a script block as that user. This is an interactive script
and a window will open in order to securely capture credentials.
.EXAMPLE
Use-Impersonation.ps1 {Get-ChildItem 'C:\' | Foreach { Write-Host $_.Name }}
This writes the contents of 'C:\' impersonating the user that is entered.
#>