Skip to content

Instantly share code, notes, and snippets.

@Tener
Tener / reclaimWindows10.ps1
Last active January 7, 2017 19:52 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@Tener
Tener / memcpy.c
Created June 27, 2014 09:38 — forked from nicky-zs/memcpy.c
#include <string.h>
void *__memcpy_glibc_2_2_5(void *, const void *, size_t);
asm(".symver __memcpy_glibc_2_2_5, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n)
{
return __memcpy_glibc_2_2_5(dest, src, n);
}
@Tener
Tener / wordfreq-bs.hs
Created June 22, 2013 09:34
Fixed wordfreq solutions to use text/bytestring
{-# LANGUAGE BangPatterns #-}
module Main where
import Prelude
import Data.ByteString as B
import Data.ByteString.Char8 as BC8
import System.Environment (getArgs)
import Control.Arrow
import Data.List (sortBy)
@Tener
Tener / http.hs
Created June 18, 2013 07:15 — forked from scan/http.hs
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Main where
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types
import qualified Data.ByteString.Char8 as B
import Control.Monad.Trans
import System.IO
import Data.List.Split (splitOn)
@Tener
Tener / GADT_fun.hs
Created May 7, 2013 19:03
Haskell datatype for holding any type implementing a typeclass
{-# LANGUAGE GADTs #-}
module Main where
import Prelude hiding (print, putStr, putStrLn)
import GenericGameExperiments
import GenericGame
import AgentGeneric
import ThreadLocal
@Tener
Tener / ThreadLocal.hs
Created May 7, 2013 14:52
A useful trick with implicit parameters and type aliases
{-# LANGUAGE ImplicitParams, Rank2Types, BangPatterns #-}
module ThreadLocal where
import Control.Concurrent
import Text.Printf
import System.IO
type ThrLocIO a = (?thrLoc :: ThreadLocal) => IO a
data ThreadLocal = ThreadLocal { tl_stdout :: MVar Handle
@Tener
Tener / plytkowanie.rb
Created March 5, 2012 08:54 — forked from DanRathbun/plytkowanie.rb
Plugin for sketch up - fixed up somewhat by Dan Rathbun - further minor fixes by original author
# -*- coding: utf-8 -*-
###
###
##### SAVE IN FORMAT: "UTF-8 WITHOUT BOM" OR "ANSI AS UTF-8"
###
###
# Plugin: "BathTiles"
# Author: Krzysztof Skrzetnicki, Dan Rathbun
# License: GPLv3
@Tener
Tener / plytkowanie.rb
Created March 3, 2012 10:31
Plugin for sketch up - with a bug!
# Wtyczka: "P-ytkuj"
# Autor: Krzysztof Skrzŕtnicki
# Licencja: GPLv3
# Wersja: 1.2
# First we pull in the standard API hooks.
require 'sketchup.rb'
# Show the Ruby Console at startup so we can
# see any programming errors we may make.
@Tener
Tener / gist:1258736
Created October 3, 2011 08:59 — forked from anonymous/gist:1253064
GHC alias analysis
// Originally based on PyAliasAnalysis from the unladen-swallow project!
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Argument.h"
#include "llvm/Constants.h"
@Tener
Tener / LookAndSay.cpp
Created September 18, 2011 22:09
Look and say in C++, reimplementation of algorithm first written in Haskell
/*
g++ -O3 -mtune=native -march=native -fomit-frame-pointer lookandsay.cpp -o lookandsay.out
time ./lookandsay.out > /dev/null
./lookandsay.out > /dev/null 2,88s user 0,05s system 99% cpu 2,948 total
*/
#include <vector>
#include <iostream>