Skip to content

Instantly share code, notes, and snippets.

Create expression tree withour convert to prefix/postfix
https://github.com/awangdev/LintCode/blob/master/Java/Expression%20Tree%20Build.java
Examples of traverse tree
https://github.com/karthikcr17/repository_training/tree/e5dd646f33e034f427205e173e74a5f7207b2c04/training/c_assignments/ds_assignment/ds_assig_2/BST/source
Example of calculator with lexer and parser
https://github.com/mtomwing/purplex/blob/4072109e1d4395826983cd9d95ead2c1dfc1184e/purplex/parse.py
// Created by Oleg 1/26/2017
using System;
using System.Collections.Generic;
using System.Linq;
using EMK.LightGeometry;
using Microsoft.Practices.Unity;
using RedStars.Utils.Wrappers;
using SampSharp.GameMode;
using SampSharp.GameMode.World;
@5LICK
5LICK / SlackAppender.cs
Created February 24, 2017 15:03
Slack appender for log4net
/*
Example config:
GameMode.SlackAppender - 'SlackAppender namespace'
<SlackWebHookUrl> - 'https://hooks.slack.com/services/.../.../'
<appender name="AnticheatSlackAppender" type="GameMode.SlackAppender">
<Url value="<SlackWebHookUrl>"/>
<Title value="Anticheat" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%level][%logger]: %message"/>
FROM f69m/ubuntu32:16.04
MAINTAINER Oleg <slicknslick@yahoo.com>
ENV DEBIAN_FRONTEND noninteractive
# install mono
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
RUN apt-get update
/*
[1]
Header size: 60 bytes
Code size: 240 bytes
Data size: 0 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1000004 cells (4000016 bytes)
Total requirements: 16684 bytes
Output amx-file size: 332b
https://www.sdcard.org/downloads/formatter_4/eula_windows/
http://neo4j.com/docs/developer-manual/current/#query-syntax
@5LICK
5LICK / find-count-of-node-duplicates.txt
Last active April 13, 2016 14:20
Finding count of duolicates
MATCH (n:Account) // Node for find duplicates ('n:NodeName' or 'n')
WITH n.uuid as nodeId, count(*) as idCount // uuid - identify by duplicate, idCount - count of duplicates
WHERE idCount > 1
RETURN nodeId, idCount
@5LICK
5LICK / gist:358ab55d2a101267671d
Created June 5, 2015 14:27
ffprobe: show geodata and select keys for show
ffprobe -v quiet -print_format json -show_streams -select_streams v -show_frames -show_entries frame_tags=1 frame_tags=GPSLatitude,GPSLongitude drop.avi slick@slick-eME732Z:~/ffmpeg$ ffprobe -v quiet -print_format json -show_streams -select_streams v -show_frames -show_entries frame_tags=GPSLatitude,GPSLongitude drop.avi