- Application settings
- Finder
- Show path -
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
- Show hidden files -
defaults write com.apple.finder AppleShowAllFiles TRUE
- Show path -
- Mail
- Minimum font size -
defaults write com.apple.mail MinimumHTMLFontSize 14
- Minimum font size -
- Finder
- Mac OSX commands
- GitHub Staff
- @belinburgh
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
package org.mambo.core.io | |
import java.nio.charset.Charset | |
import java.nio.{CharBuffer, ByteBuffer} | |
/** | |
* @author Blackrush | |
*/ | |
class BigEndianBuffer(private var buf: Array[Byte], var offset: Int = 0) extends Buffer { | |
import BigEndianBuffer._ |
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
require 'rubygems' | |
require 'learn_mapreduce' | |
mr = MapReduce.new | |
mr.map do |record| | |
emit(record[0], 1) | |
end | |
mr.reduce do |key, list_of_values| |
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
require 'fiddle' | |
module IAmAHorriblePerson | |
def unset flag | |
value = _wrap self | |
flags = 8.times.map { |i| value[i] }.pack('C8').unpack('Q').first | |
[flags & ~flag].pack('Q').unpack('C8').each_with_index { |n,i|value[i] = n } | |
end | |
def class= k |
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
// $ 6g echo.go && 6l -o echo echo.6 | |
// $ ./echo | |
// | |
// ~ in another terminal ~ | |
// | |
// $ nc localhost 3540 | |
package main | |
import ( |
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
// Kill causes the Process to exit immediately. | |
func (p *Process) Kill() error { | |
return p.kill() | |
} | |
func (p *Process) kill() error { | |
return p.Signal(Kill) | |
} | |
// The only signal values guaranteed to be present on all systems |
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
-module (demo). | |
-export ([taille/1]). | |
-export ([somme/1]). | |
taille([]) -> 0; | |
taille([_|Tail]) -> 1 + taille(Tail). | |
somme([]) -> 0; | |
somme([Head|Tail]) -> Head + somme(Tail). |
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
// Index of maximum: j | |
int j = 0; | |
for (int i = 1; i < array.length; i++) { | |
if (array[i] > array[j]) j = i; | |
} |
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
// This is the structure of the binary nbt file | |
TAG_Compound('Level') { | |
TAG_Compound('nested compound test') { | |
TAG_Compound('egg') { | |
TAG_String('name'): 'Eggbert' | |
TAG_Float('value'): 0.5 | |
} | |
TAG_Compound('ham') { | |
TAG_String('name'): 'Hampus' | |
TAG_Float('value'): 0.75 |
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
sumUpTo :: Int -> [(Int, Int)] | |
sumUpTo n = map (\x -> (x, n - x)) [0..n] | |
mult xs ys = do | |
cs <- map sumUpTo [0..maxCoef] | |
return (sum $ map g $ filter f cs) | |
where | |
maxCoef = length xs + length ys - 2 | |
f (x, y) = x < length xs && y < length ys | |
g (x, y) = (xs !! x) * (ys !! y) |