View syscall.rs
This file contains 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
use std::arch::asm; | |
fn main() { | |
let str = b"Hello world\n"; | |
unsafe { | |
let res = syswrite(str.as_ptr() as u64, str.len() as u64); | |
println!("res: {}", res); | |
} | |
} |
View bounce.ghc
This file contains 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
% bouncing balls | |
-initialization(main). | |
main :- | |
poke(0x4c00, [0x3c, 0x7e, 0xff, 0xff, 0xff, 0xff, 0x7e, 0x3c], D1), | |
set_colors(0x0ce9, 0x01c0, 0x0ce5, D2), | |
start(D1, D2). | |
start([], []) :- |
View filmvandaag_hide_low_scores.userscript.js
This file contains 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 Hide low scores from filmvandaag.nl | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Hides every score below a 6 from filmvandaag.nl movie results | |
// @author Erik Terpstra | |
// @match https://www.filmvandaag.nl/* | |
// @icon https://www.google.com/s2/favicons?domain=filmvandaag.nl | |
// @grant none | |
// ==/UserScript== |
View optiontest.gleam.rs
This file contains 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
import gleam/list | |
import gleam/result | |
import gleam/string | |
type PersonalName { | |
PersonalName( | |
first_name: String, | |
middle_initial: result.Option(String), | |
last_name: String, | |
) |
View app.js
This file contains 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
// https://github.com/EightMedia/hammer.js/blob/master/hammer.js | |
function toId(t) { | |
return t.toLowerCase().replace(/[^a-z]/gi, "-").replace(/-+/gi, "-") | |
} | |
function toc() { | |
var t = $("#sidebar").html(""); | |
$("h1,h2,h3").each(function() { | |
var e = $(this).clone(), n = $(this).offset().top; | |
"#" != e.html() && (e.is("h3") && e.html("‐ " + e.html()), t.append(e), e.on("click", function() { | |
$("body").animate({scrollTop: n}, 200) |
View do_sequentially.nim
This file contains 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
# Currently doesn't work | |
import macros | |
macro do_sequentially(idx: int, statements: varargs[untyped]): untyped = | |
result = nnkStmtList.newTree() | |
do_sequentially(1): | |
do: echo "Foo" | |
do: echo "Bar" |
View oberon0_fragment.ohm
This file contains 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
Oberon0 { | |
Module = "MODULE" ident ";" "BEGIN" StatSeq "END" ident "." | |
StatSeq = statement (";" statement)* | |
statement = procedureCall? | |
procedureCall = ident (actualParameters | "*")? | |
actualParameters = "(" integer ("," integer)* ")" | |
integer = digit+ | |
ident = letter alnum* | |
} |
View io.mod
This file contains 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
MODULE IO; (*for Oberon0 NW 29.4.2017*) | |
IMPORT Texts,Oberon; | |
VAR S: Texts.Scanner; W: Texts.Writer; | |
PROCEDURE OpenInput*; | |
BEGIN Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S) | |
END OpenInput; | |
PROCEDURE ReadInt*(VAR x: LONGINT); | |
BEGIN x := S.i; Texts.Scan(S) |
View reasoneq.re
This file contains 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
type customerId = | |
| CustomerId(int); | |
type orderId = | |
| OrderId(int); | |
let cid = CustomerId(42); | |
let oid = OrderId(42); | |
cid == oid; |
View Samsung Smart-TV Blocklist Adlist (for PiHole)
This file contains 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
# This is a blocklist to block samsung smart tv's sending meta data at home. | |
# Please help to collect domains! | |
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident. | |
# https://gist.github.com/Perflyst/315f86393712a0c2107ee8eb58c6acee | |
0.0.0.0 device-metrics-us.amazon.com | |
0.0.0.0 samsungacr.com | |
0.0.0.0 samsungcloudsolution.com | |
0.0.0.0 samsungcloudsolution.net | |
0.0.0.0 pavv.co.kr |
NewerOlder