Skip to content

Instantly share code, notes, and snippets.

View joom's full-sized avatar

Joomy Korkut joom

View GitHub Profile
@eser
eser / fuatavni.js
Last active August 29, 2015 13:57 — forked from f/fuatavni.js
// Fuatavnizer v0.1
function fuatavni(s, t){var m=Math,y;y=[s.join("\n")+"\nAnaliz."].concat(t.split(/[\.\,]\s*/).filter(function(c){return!!c}).map(function(c,i){i++;var x=m.floor(m.random()*10)%3;return x==1?i+". Adetullahtandır, "+c+".":(x==2?i+". "+c+". Korkma, titre.":i+". "+c)}));y.push((y.length+1)+". Güzel insanlar, duanızı bekliyorum.");return y;}
// Usage:
fuatavni(["Lorem ipsum?", "dolor sit?"], "Lorem ipsum dolor sit amet, \
consectetur, sed do eiusmod tempor incididunt ut labore et dolore \
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute \
irure dolor in reprehenderit in voluptate velit esse cillum dolore \
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non \
@copumpkin
copumpkin / RuntimeTypes.agda
Last active July 24, 2018 19:01
Simulating "type providers" in Agda
module RuntimeTypes where
open import Function
open import Data.Unit
open import Data.Bool
open import Data.Integer
open import Data.String as String
open import Data.Maybe hiding (All)
open import Data.List
open import Data.List.All
@jrraymond
jrraymond / prepend.sh
Created April 4, 2014 22:49
Prepends text to files in a directory
#!/bin/bash
JSCSS=$'/* Copyright (C) 2014 Wesleyan University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@jrraymond
jrraymond / anagram.hs
Last active August 29, 2015 13:58
Tests whether two strings are anagrams in O(n) time.
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable
isAnagram :: [Char] -> [Char] -> Bool
isAnagram xs ys = f xs ys Map.empty
where
f :: [Char] -> [Char] -> Map Char Int -> Bool
f (x:xs) ys m = if x `Map.member` m
module Printf
%default total
data Format = FInt Format -- %d
| FString Format -- %s
| FOther Char Format -- [a-zA-Z0-9]
| FEnd --
format : List Char -> Format
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active October 13, 2025 20:38
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@kristopherjohnson
kristopherjohnson / fsharp.swift
Last active August 29, 2015 14:02
F#-isms translated into Swift
// Wrap closure that will be evaluated only the first time force()/value is called.
// Subsequent calls will return the already-calculated value.
class Lazy<T> {
init(_ closure: () -> T) {
self.force = { [unowned self] in
let v = closure()
self.force = { return v }
return v
}
}
@jozefg
jozefg / closconv.lhs
Last active June 4, 2025 10:59
Tutorial on Closure Conversion and Lambda Lifting
This is my short-ish tutorial on how to implement closures in
a simple functional language: Foo.
First, some boilerplate.
> {-# LANGUAGE DeriveFunctor, TypeFamilies #-}
> import Control.Applicative
> import Control.Monad.Gen
> import Control.Monad.Writer
> import Data.Functor.Foldable
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing
@BatuhanK
BatuhanK / Radikal-reverse
Last active May 17, 2020 12:47
Radikal Private API
RADİKAL
=====================================
HABER LİSTELEME ve DETAYLANDIRMA
--------------------------------
* Tüm rastgele cihaz id'ler yerine 1 yazılabilir
// Sayfa 1 den başlıyor
GET -> http://native.radikal.com.tr/native/dailynews/{sayfa}/{rastgele-cihaz-id}