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
wget https://raw.githubusercontent.com/osandov/osandov-linux/58e0c5f1bc7f0866ce7a18bcb67f3eabf4be7868/scripts/btrfs_map_physical.c | |
gcc -O2 -o btrfs_map_physical btrfs_map_physical.c | |
sudo mount /dev/mapper/data-root /mnt | |
sudo btrfs sub create /mnt/@swap | |
sudo umount /mnt | |
sudo mkdir /swap | |
sudo mount -o subvol=@swap /dev/mapper/data-root /swap | |
sudo touch /swap/swapfile | |
sudo chmod 600 /swap/swapfile |
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
# -*- coding: utf-8 -*- | |
""" | |
Grb256 Colorscheme | |
~~~~~~~~~~~~~~~~~~ | |
Converted by Vim Colorscheme Converter | |
""" | |
from pygments.style import Style | |
from pygments.token import Token, Comment, Name, Keyword, Generic, Number, Operator, String |
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
using System; | |
using System.Diagnostics; | |
namespace SunriseCalculator | |
{ | |
public class SolarInfo | |
{ | |
public double SolarDeclination { get; private set; } | |
public TimeSpan EquationOfTime { get; private set; } | |
public DateTime Sunrise { get; private set; } |
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
/// | |
/// Allows basic access to the windows firewall API. | |
/// This can be used to add an exception to the windows firewall | |
/// exceptions list, so that our programs can continue to run merrily | |
/// even when nasty windows firewall is running. | |
/// | |
/// Please note: It is not enforced here, but it might be a good idea | |
/// to actually prompt the user before messing with their firewall settings, | |
/// just as a matter of politeness. | |
/// |
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
### | |
# Scheme code is translated to YARV byte code, then evaluated in the | |
# Ruby Virtual Machine | |
require 'rbconfig' | |
require 'dl' | |
require 'fiddle' | |
require 'strscan' | |
class RubyVM |
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
# to install the latest stable version: | |
brew install scala --with-docs | |
# to install scala-2.10.0-RC1: | |
brew install https://raw.github.com/gist/3939012/scala.rb --with-docs | |
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
brew switch scala 2.9.2 | |
brew switch scala 2.10.0-RC1 |
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
# implement the functions `amb` and `assert`. | |
# `amb` must choose a value from a given set, | |
# such that all assertions pass. | |
# as an example, the following program: | |
a = amb [1,2,3,4,5,6,7] | |
b = amb [1,2,3,4,5,6,7] | |
c = amb [1,2,3,4,5,6,7] | |
# a, b and c must define a legal right triangle: |
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
{-# LANGUAGE StandaloneDeriving, DataKinds, PolyKinds, GADTs, RankNTypes, TypeOperators, FlexibleContexts, TypeFamilies, KindSignatures #-} | |
-- http://www.timphilipwilliams.com/posts/2013-01-16-fixing-gadts.html | |
module HRecursionSchemes where | |
import Control.Applicative | |
import Data.Functor.Identity | |
import Data.Functor.Const | |
import Text.PrettyPrint.Leijen hiding ((<>)) |
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
require 'formula' | |
class Zsh < Formula | |
head "https://bitbucket.org/ZyX_I/zsh.git", :revision => 'abcf1a0ba666119b5aba48f0efd6a2f60acfc3c4' | |
homepage 'http://www.zsh.org/' | |
version '5.0.2' | |
depends_on 'gdbm' | |
depends_on 'pcre' | |
depends_on :python |
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
(require 'sr-speedbar) | |
(setq speedbar-frame-parameters | |
'((minibuffer) | |
(width . 40) | |
(border-width . 0) | |
(menu-bar-lines . 0) | |
(tool-bar-lines . 0) | |
(unsplittable . t) | |
(left-fringe . 0))) |