Skip to content

Instantly share code, notes, and snippets.

View kyrylo's full-sized avatar

Kyrylo Silin kyrylo

View GitHub Profile
@kyrylo
kyrylo / a.rs
Created July 20, 2018 16:34
Filters
fn main() {
let mut notifier = Notifier::new();
notifier.add_filter(|n| n.incr_count(1));
notifier.add_filter(|n| n.incr_count(1));
let mut notice = Notice::new();
println!("Before: {:#?}", notice);
notifier.notify(&mut notice);
println!("After: {:#?}", notice);
package main
import (
"database/sql"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
@kyrylo
kyrylo / PKGBUILD
Last active August 29, 2015 14:19
openra-20150424 PKGBUILD
# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Matthew Bowra-Dean <matthew@ijw.co.nz>
pkgname=openra
pkgver=20150424
pkgrel=1
pkgdesc="An open-source implementation of the Red Alert engine using .NET/mono and OpenGL"
arch=('any')
url="http://openra.net"
license=('GPL3')
@kyrylo
kyrylo / a.js
Created November 7, 2014 03:00
x = {}
> Object {}
x[{}] = 1
> 1
x[{a: 999}] = 2
> 2
x[{}]
> 2
x[{a: 999}]
> 2
-module(my_tuple_to_list).
-compile(export_all).
my_tuple_to_list(T) ->
my_tuple_to_list_acc(T, [], tuple_size(T)).
my_tuple_to_list_acc(_T, L, 0) -> L;
my_tuple_to_list_acc(T, L, N) ->
my_tuple_to_list_acc(T, [element(N, T)|L], N - 1).
# Maintainer: Kristaps Esterlins <kristaps.esterlins@gmail.com>
#
pkgname=artwiz-ru-fonts
_pkgname=artwiz_ru
pkgver=1
pkgrel=2
pkgdesc="Russian version of the artwiz fonts. Supported encodings: ISO 10646-1, KOI8-R and CP1251"
arch=('i686' 'x86_64')
url="http://www.freshports.org/russian/artwiz-ru/"
ส็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็็-
[1] pry(main)> loop { }
^CInterrupt:
from (pry):1:in `block in __pry__'
[2] pry(main)>
~% time pry -e exit
pry -e exit 0.47s user 0.06s system 99% cpu 0.540 total
~%
~% pry --installed-plugins
Installed Plugins:
--
coolline Live syntax-highlighting for the Pry REPL
debugger Fast debugging with Pry.
debundle Allows you to use gems not in your Gemfile from Pry.
doc Provides YARD and extended documentation support for Pry