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
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <cctype> | |
#include "optional.hpp" | |
// c++14 optional<T> for c++11. | |
// https://github.com/akrzemi1/Optional | |
namespace tr2 = std::experimental; |
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
#!/bin/sh | |
echo "noop" > /sys/block/sda/queue/scheduler | |
echo 5 > /proc/sys/vm/laptop_mode | |
echo 0 > /proc/sys/kernel/nmi_watchdog | |
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings | |
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo ondemand > $i; done | |
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs | |
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done | |
for i in /sys/class/scsi_host/host*/link_power_management_policy; do echo min_power > $i; done |
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
Section "InputClass" | |
Identifier "np900x4b clickpad" | |
MatchIsTouchpad "on" | |
Driver "synaptics" | |
# Enable the clickpad and set click actions | |
Option "ClickPad" "1" | |
Option "ClickFinger1" "1" | |
Option "ClickFinger2" "1" | |
Option "ClickFinger3" "1" |
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
[2:00 PM] <@lholden> a library for DCI with Ruby : https://github.com/cjbottaro/schizo | |
[2:01 PM] <@lholden> I like that way better then the #extend pattern | |
[2:02 PM] <Skif> I'm liking Data Mapper (not DataMapper) as the inverse of DCI: http://solnic.eu/2012/01/10/ruby-datamapper-status.html | |
[2:05 PM] <Skif> Note that the linked article does refer to DataMapper, but it's the as yet unrelease 2.x branch | |
[2:05 PM] <@cschneid> lholden: is there a speed comparison? | |
[2:05 PM] <@cschneid> I do like it | |
[2:06 PM] <@cschneid> but dynamically creating fascades everywhere could be expensive | |
[2:06 PM] <@cschneid> or not. No idea. | |
[2:06 PM] <@lholden> Eh... most of the time the expense of this sort of stuff wouldn't really be an issue for us. Though, I guarantee it has an overhead :) | |
[2:06 PM] <@cschneid> sure |
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
CL-USER(15): (glop:with-window (win "My title" 800 600) | |
(loop while (glop:dispatch-events win :blocking nil) do | |
(glop:swap-buffers win))) | |
Resize: 800x600 | |
Draw | |
debugger invoked on a SIMPLE-ERROR in thread | |
#<THREAD "initial thread" RUNNING {10029C1523}>: | |
0 is not defined as a value for enum type #<CFFI::FOREIGN-ENUM | |
GLOP-BRIDGE:NS-EVENT-TYPE>. |
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
! Or whatever your WAN interface is | |
interface fastethernet 4 | |
no ip address | |
ip virtual-reassembly in | |
pppoe enable group global | |
pppoe-client dial-pool-number 1 | |
exit | |
interface dialer 1 |
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-add=ruby=.haml,.rake,.rsel,.builder | |
--type-add=html=.html.erb,.html.haml | |
--type-add=js=.js.erb | |
--type-add=css=.sass | |
--type-set=cucumber=.feature | |
--ignore-dir=vendor | |
--ignore-dir=log | |
--ignore-dir=tmp | |
--ignore-dir=doc | |
--ignore-dir=coverage |
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
declare -r MAX_PATH_LENGTH=40 | |
declare -r GIT_PS1_SHOWDIRTYSTATE=true | |
declare -r COLOR_PATH="\[\e[34;1m\]" | |
declare -r COLOR_EXTRAS="\[\e[35m\]" | |
declare -r COLOR_USER="\[\e[1;36;40m\]" | |
declare -r COLOR_ROOT="\[\e[1;31;40m\]" | |
declare -r COLOR_HOST="" | |
declare -r COLOR_RESET="\[\e[0m\]" |
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
(function () { | |
var save; | |
var freshBoard; | |
var oldSetupGame = this.setupGame; | |
this.setupGame = function() { | |
oldSetupGame(); | |
save = freshBoard = saveState(); | |
} |
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
#lang scheme | |
(require scheme/gui/base) | |
(require framework) | |
(application:current-app-name "TestApp") | |
(preferences:set-default 'TestApp:size-preference '(600 400) | |
(λ(size) (and (list? size) | |
(andmap (λ(i) (positive? i)) size)))) | |
NewerOlder