start new:
tmux
start new with session name:
tmux new -s myname
| from bs4 import BeautifulSoup | |
| from markdown import markdown | |
| import re | |
| def markdown_to_text(markdown_string): | |
| """ Converts a markdown string to plaintext """ | |
| # md -> html -> text since BeautifulSoup can extract text cleanly | |
| html = markdown(markdown_string) |
| // F#'s "pipe-forward" |> operator | |
| // | |
| // Also "Optional-chaining" operators |>! and |>& | |
| // | |
| // And adapters for standard library map/filter/sorted | |
| infix operator |> { precedence 50 associativity left } | |
| infix operator |>! { precedence 50 associativity left } | |
| infix operator |>& { precedence 50 associativity left } | |
| infix operator |>* { precedence 50 associativity left } |
| #!/bin/sh | |
| # Debian has older Erlang package (R15) in official repositories, Elixir requires newer (R17) | |
| wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
| sudo dpkg -i erlang-solutions_1.0_all.deb | |
| sudo apt-get update | |
| sudo apt-get install -y erlang | |
| rm erlang-solutions_1.0_all.deb | |
| # compile Elixir from source |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Bucket | |
| type = "2" | |
| version = "2.0"> | |
| <Breakpoints> | |
| <BreakpointProxy | |
| BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint"> | |
| <BreakpointContent | |
| shouldBeEnabled = "Yes" | |
| ignoreCount = "0" |
| # Elixir v1.0 | |
| defmodule Rules do | |
| defmacro __using__(_) do | |
| quote do | |
| import unquote(__MODULE__) | |
| @before_compile unquote(__MODULE__) | |
| @rules [] | |
| end | |
| end | |
| For AppStore apps: | |
| defaults write com.getharvest.harvestxapp TimeFormat hours_minutes | |
| defaults write com.getharvest.harvestxapp TimeFormat decimal | |
| defaults write com.getharvest.harvestxapp TimeFormat server | |
| For apps downloaded directly from GetHarvest: | |
| defaults write ~/Library/Preferences/com.getharvest.harvestx.plist TimeFormat hours_minutes | |
| defaults write ~/Library/Preferences/com.getharvest.harvestx.plist TimeFormat decimal |
| - (void)drawRect:(CGRect)rect { | |
| UIBezierPath *path = [UIBezierPath bezierPath]; | |
| [path addArcWithCenter:CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)) radius:CGRectGetHeight(self.bounds) startAngle:0 endAngle:2.0*M_PI clockwise:YES]; | |
| [path addArcWithCenter:CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)) radius:100 startAngle:0 endAngle:2.0*M_PI clockwise:NO]; | |
| [path addClip]; | |
| self.layer.cornerRadius = 10.0; | |
| CGFloat colors[12] = { | |
| 0.1, 0.18, 0.54, 1.0, |
| - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller | |
| { | |
| self.shouldReloadCollectionView = NO; | |
| self.blockOperation = [[NSBlockOperation alloc] init]; | |
| } | |
| - (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id<NSFetchedResultsSectionInfo>)sectionInfo | |
| atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type | |
| { | |
| __weak UICollectionView *collectionView = self.collectionView; |
| # Get a proper Maven | |
| wget http://xenia.sote.hu/ftp/mirrors/www.apache.org/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz | |
| tar xzf apache-maven-3.0.5-bin.tar.gz | |
| export PATH=/home/hadoop/apache-maven-3.0.5/bin:$PATH | |
| echo 'export PATH=/home/hadoop/apache-maven-3.0.5/bin:$PATH' >> ~/.bash_profile | |
| # Install a supported version of protobuf | |
| sudo apt-get remove protobuf-compiler | |
| wget https://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz | |
| tar xzf protobuf-2.4.1.tar.gz |