Skip to content

Instantly share code, notes, and snippets.

View DeTeam's full-sized avatar
🍪
le cookie

Timur Amirov DeTeam

🍪
le cookie
View GitHub Profile
@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 14, 2023 17:19
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

{-# LANGUAGE RankNTypes #-}
newtype State s a = State { runState :: forall r. s -> (a -> s -> r) -> r }
stateReturn :: a -> State s a
stateReturn a = State $ \s k -> k a s
stateMap :: (a -> b) -> State s a -> State s b
stateMap f (State sa) = State $ \s kb -> sa s (kb . f)
@kevincennis
kevincennis / v8.md
Last active May 6, 2024 05:25
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)

#HH

  • HH express visual fixes
  • GA tracking web + mobile
  • Bring back reward stamps
  • Member id cleanup -> email
  • New price plans for worldcup
  • Helikom improvements
  • Load tests

#QA

@ddiachkov
ddiachkov / zipper.rb
Created September 18, 2013 15:37
Реализация зиппера для ruby
require_relative "./node"
module AST
##
# Реализация зиппера для обхода структуры AST.
#
# Что такое зиппер? Это паттерн из функционального программирования, предлагаемый
# в качестве более продвинутой замены визиторов. По сути энумератор (или курсор),
# умеет ходить не только вперёд/назад, но и вверх/вниз по дереву. Кроме этого
# во время обхода дерева зиппер позволяет нам удалять/заменять/добавлять ноды
import Data.Foldable
import Data.Monoid
pipeline :: [a -> a] -> a -> a
pipeline = appEndo . getDual . foldMap (Dual . Endo)
main = print $ pipeline [(+1), (*10)] 100
@bmaddy
bmaddy / gist:912632
Created April 10, 2011 19:17
Continuation monad in javascript
function M(){};
M.contResult = function(value){
return function(cont){
console.log('in result: ' + value);
return cont(value);
}
}
M.contBind = function(mValue, mFunc){