We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| /*! normalize-all-you-really-need-tho.css v1.0.0 | MIT License */ | |
| html { | |
| font-family: sans-serif; /* 1 */ | |
| -webkit-text-size-adjust: 100%; /* 2 */ | |
| -ms-text-size-adjust: 100%; /* 2 */ | |
| } | |
| body { | |
| margin: 0; |
| /** | |
| * converts cartesion to polar coordinates | |
| * result: | |
| * [0] = length | |
| * [1] = angle z-axis rotation [-PI, PI](range) Z軸回転 | |
| * [2] = angle of projection into x,y, plane with x-axis [-PI, PI](range) | |
| */ | |
| static ofVec3f cartesianToPolar(const ofVec3f &v) | |
| { | |
| ofVec3f polar; |
| import Data.Vector ((!)) | |
| import qualified Data.Vector as V | |
| import Data.Vector.Generic.Mutable (write) | |
| step ws state = case updatable of [] -> state | |
| (i,_):_ -> V.modify (\v -> write v i (o i)) state | |
| where | |
| n = V.length state | |
| w i j = ws ! i ! j |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| const int infinity = 2147483647; | |
| struct edge_t { | |
| int v1; | |
| int v2; | |
| int cost; |
| #ifndef WIN32_NO_STATUS | |
| # define WIN32_NO_STATUS | |
| #endif | |
| #include <windows.h> | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <winerror.h> | |
| #include <stddef.h> | |
| #include <winnt.h> | |
| #include <limits.h> |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| {-# LANGUAGE EmptyDataDecls #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE QuasiQuotes #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# OPTIONS_GHC -fno-warn-orphans #-} |
| def process(input) | |
| commands = { | |
| 'q' => 'Goodbye', | |
| 'tweet' => 'tweeting', | |
| 'dm' => 'direct messaging', | |
| 'help' => 'helping' | |
| } | |
| if command = commands[input] | |
| puts command |
| gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf | |
| found at https://bbs.archlinux.org/viewtopic.php?id=65036 |
| #!/bin/bash | |
| # convert DjVu -> PDF | |
| # usage: djvu2pdf.sh <file.djvu> | |
| # depends on ddjvulibre package, To install package run `sudo apt-get install ddjvulibre` | |
| i="$1" | |
| echo "------------ converting $i to PDF ----------------"; | |
| o="`basename $i .djvu`" | |
| o="$o".pdf |