Skip to content

Instantly share code, notes, and snippets.

@mbrc12
mbrc12 / fractal.hs
Last active October 26, 2020 17:44
fractal
{-
fractal : A fractal generator in haskell
Author : Mriganka Basu Roy Chowdhury
Install : Preferably (if you don't want cabal hell),
form a cabal sandbox and install JuicyPixels
and optparse-applicative. Then just
cabal exec -- ghc fractal.hs -O3
Please use -O3, as otherwise, the generation
@The-Quill
The-Quill / SO_Docs_Rooms.md
Last active July 27, 2016 18:23
A list of some of the Docs-dedicated rooms on Stack Overflow
@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@Psycojoker
Psycojoker / a.md
Last active October 10, 2017 17:51
Github's pages targeted by porn industry DMCA request to google

Apparently the porn industry is going after github pages (by sending DMCA to google), you can read the story here (found there).

Using https://www.chillingeffects.org/notices/search?page=1&sort_by=&term=github.com (https://github.com/berkmancenter/chillingeffects/blob/master/doc/api_documentation.mkd#example-successful-response-2) (and an horribly quick and dirty script), here is the list all the concerned users and repositories page (you can find the data bellow):

Users pages

@Wunkolo
Wunkolo / ASCIIRayTrace.cpp
Last active June 13, 2021 05:36
Just a fun ASCII raytracer I made one day.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <string>
#include <initializer_list>
#include <thread>
#include <chrono>
@kumar8600
kumar8600 / lingr-api-memo.md
Last active October 27, 2015 04:59
Lingr API メモ

ここでは、Lingr Bot APIについての情報を取り扱わず、Lingr APIについてのみ扱う。

参照

@hoto17296
hoto17296 / snowfall.css
Last active December 31, 2015 17:19
こなああああああゆきいいいいいい ねぇ!!!
@charset "utf-8";
/* labelと:checked擬似クラスで擬似onClick実装 */
#snowfall label {
font-size: xx-large;
fon-weight: bold;
color: #fff;
background-color: #99f;
padding: .5em 1em;
margin: 1em 0;
void drawFolder(int sides, float rad) {
float ang = (frameCount * 2 * PI * 0.05) / sides;
PVector maxy = new PVector(0, 0);
PVector[] v = new PVector[sides];
for (int i = 0; i != v.length; ++i) {
float angle = ((2 * PI * i) / sides) + ang;
float x = sin(angle) * rad;
@bouk
bouk / dijkstra.hs
Created January 6, 2013 14:17
Dijkstra's algorithm implemented in Haskell. Example input: 5 7 0 1 2 0 2 7 0 3 6 1 4 6 1 2 3 2 4 5 3 4 1
import Data.List (insert)
fst3 (x,_,_) = x
snd3 (_,x,_) = x
trd3 (_,_,x) = x
toTuple2Int :: String -> (Int, Int)
toTuple2Int s = (read $ takeWhile (/=' ') s :: Int, read $ dropWhile (==' ') $ dropWhile (/=' ') s :: Int)
toTupleTuple2Int :: String -> (Int, (Int, Int))
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 23, 2024 18:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname