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
// Demonstrate threads and signals in D (dlang). | |
import std.stdio; | |
import core.thread; | |
shared bool g_Running = true; | |
version(Windows) { | |
import core.sys.windows.windows; | |
extern(Windows) BOOL CtrlHandler(DWORD fdwCtrlType) nothrow { |
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
# Install prerequisites | |
sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev libudev-dev | |
# Build Reicast | |
git clone https://github.com/reicast/reicast-emulator.git | |
cd reicast-emulator | |
git checkout master # Make sure on 'master' branch so will find the necessary subdir (not in alpha branch). | |
cd shell/linux | |
make | |
# Run Reicast |
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 GitHub SearchToggler | |
// @namespace 87901be6f9d184fd17613010a80448e2 | |
// @version 0.2 | |
// @description Toggle between a global search and repo searches on GitHub. | |
// @author Sam Saint-Pettersen <[email protected]> | |
// @match https://github.com/* | |
// @icon https://github.com/favicon.ico | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/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
// ==UserScript== | |
// @name Duolingo Trim tree | |
// @namespace 9a84a9d7b3fef7de9d2fd7155dcd794c | |
// @description Hides all golden skills with a button. | |
// @author Arek Olek | |
// @match https://www.duolingo.com/* | |
// @icon https://s32.postimg.org/8zxj3evit/duolingo.png | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js |
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 Ecosia Trees Planted | |
// @namespace 481487dd5200e3aa69b16a9d80fa5f75 | |
// @version 0.3 | |
// @description Display estimated number of trees planted with Ecosia. | |
// @author Sam Saint-Pettersen <[email protected]> | |
// @match https://www.ecosia.org/* | |
// @icon https://s2.postimg.org/407qv942h/small-tree-icon-0.jpg | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// ==/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
# | |
# Dockerfile for a Node.js-based application; derived from @phusion's container | |
# (Docker optimized Ubuntu 16.04 LTS system phusion/base-image:latest container | |
# - https://github.com/phusion/baseimage-docker/blob/master/image/Dockerfile). | |
# | |
# saintpettersens/docker-nodejs | |
# | |
FROM phusion/baseimage:latest |
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
/* | |
Talking clock | |
Command line application which says the time. | |
Copyright 2017 Sam Saint-Pettersen. | |
Released under the MIT License. | |
*/ | |
extern crate clioptions; | |
extern crate litepattern; |
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
/* | |
Utility to calculate the volume of paint needed to | |
paint a room of supplied dimensions. | |
Sam Saint-Pettersen, 2017. | |
*/ | |
extern crate clioptions; | |
use clioptions::CliOptions; | |
use std::io::stdin; | |
use std::process::exit; |
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/sh | |
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT | |
# file at the top-level directory of this distribution and at | |
# http://rust-lang.org/COPYRIGHT. | |
# | |
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
# option. This file may not be copied, modified, or distributed | |
# except according to those terms. |
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
/* | |
Spoof netsh command. | |
Public domain. | |
- Sam Saint-Pettersen. | |
*/ | |
#include <iostream> | |
int main() { | |
std::cout << "Name : DUMMY_WIFI" << std::endl; |
NewerOlder