This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# foldr applies the first argument, a function which takes two arguments, to | |
# the accumulator z, whose value changes on each for-loop iteration, and x, | |
# which is the current iteration's element of the xs list. | |
def foldr(f, z, xs): | |
for x in xs: z = f(z, x) | |
return z | |
# A version of foldr that takes no starting value, z, and instead uses the first | |
# argument in the list as the starting value. | |
# Raises an exception when an empty list is passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body | |
{ background: #101010 | |
; background-image: url("http://a.pomf.se/A6g8P4.png") | |
; background-repeat: repeat | |
; color: #d0d0d0 | |
; font-family: "Avant Garde", "Century Gothic", sans-serif | |
; font-size: 10pt | |
; margin: 0 | |
; padding: 0 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HexIP | |
// @description i recognize that IP address! | |
// @version 0.1.1 | |
// @include http*://*.zetaboards.com/*/topic/* | |
// @author Shou | |
// @copyright 2013, Shou | |
// @license GPL-3 | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face | |
{ font-family: "Lobster" | |
; src: url(https://s3.amazonaws.com/Shoufonts/lobster_1.3-webfont.woff) | |
} | |
@font-face | |
{ src: url(https://s3.amazonaws.com/Shoufonts/Asap-Regular.woff) format('woff') | |
; font-family: "AssApp" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face | |
{ src: url(https://s3.amazonaws.com/Shoufonts/Condiment-Regular.woff) format('woff') | |
; font-family: "Condom" | |
} | |
@font-face | |
{ src: url(https://s3.amazonaws.com/Shoufonts/Asap-Regular.woff) format('woff') | |
; font-family: "AssApp" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FuckSteam | |
// @description Automatically pass link warnings of Steam | |
// @version 0.1 | |
// @include http*://steamcommunity.com/linkfilter/* | |
// @author Shou | |
// @copyright 2014, Shou | |
// @license GPL-3 | |
// @run-at document-start | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# SETUP | |
# Device MAC address | |
MAC="FF:FF:FF:FF:FF:FF" | |
# IP subnet range | |
RANGE="192.168.0.0/27" | |
timeout=1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.channels-wrap | |
{ max-width: 0px | |
; overflow: hidden | |
; transition: max-width 0s ease-in-out | |
} | |
.channels-wrap:hover, | |
.channels-wrap:focus | |
{ max-width: 50rem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Discord WebM embed | |
// @description Embeds uploaded and linked WebM files | |
// @namespace Shou | |
// @include https://discordapp.com/channels/* | |
// @version 1 | |
// ==/UserScript== | |
var styleElem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pascal :: Int -> [[Int]] | |
pascal n = take n $ snd (foldl go ([], []) [0 .. n]) | |
where | |
go :: ([Int], [[Int]]) -> Int -> ([Int], [[Int]]) | |
go ([], []) _ = ([1,1], [[1], [1,1]]) | |
go (lst, xs) _ = let newLst = sub lst False in (newLst, xs ++ [newLst]) | |
sub :: [Int] -> Bool -> [Int] | |
sub (first : second : rest) False = 1 : first + second : sub (second : rest) True | |
sub (first : second : rest) True = first + second : sub (second : rest) True |
OlderNewer