(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# ~/.vim/filetype.vim | |
au BufNewFile,BufRead *.gradle setf groovy |
#!/usr/bin/env python3 | |
"""A simple python script template. | |
""" | |
import os | |
import sys | |
import argparse |
println """ | |
some "text" with quotes | |
""".replaceAll (/\"/,/\\\"/) |
#!/usr/bin/env ruby | |
Dir.chdir File.join(__FILE__, "../..") | |
unless ENV['EDITOR'] | |
puts "No EDITOR found. Try:" | |
puts "export EDITOR=vim" | |
exit 1 | |
end | |
unless ARGV.count == 2 |
# Enable syntax-highlighting in less. | |
# Last tested on CentOS 6.3. | |
# | |
# First, add these two lines to ~/.bashrc | |
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" | |
# export LESS=" -R " | |
sudo yum -y install boost boost-devel ctags | |
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:showDividers="middle" | |
android:divider="?android:listDivider" | |
android:dividerPadding="16dp"> | |
</LinearLayout> |
f :: [Bool] -> Bool | |
f = and | |
g :: (Eq a) => ([a],[a]) -> [Bool] | |
g = uncurry $ zipWith (==) | |
h :: (Eq a) => ([a],[a]) -> Bool | |
h = f . g | |
f' :: [Bool] -> Bool |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
public class CustomEllipsizeTextView extends TextView { | |
private static final int MAX_LINE = 2; | |
private static final String ELLIPSIZE_STRING = "..."; | |
private String originalText; | |
private int maxLines = MAX_LINE; | |
private String postfix; | |
private boolean postfixAdded; |