(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.
rm -fr ~/.ghc | |
rm -fr ~/Library/Haskell/*/lib | |
rm -fr ~/Library/Haskell/bin/* | |
rm -fr ~/Library/Haskell/repo-cache | |
rm -fr ~/.cabal/packages | |
# Then in your project | |
# rm -fr .hsenv |
#include <sys/types.h> | |
#include <ifaddrs.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
bool getIP(string &ip) | |
{ | |
struct ifaddrs *ifa_buf = NULL; /// /usr/include/ifaddrs.h | |
struct ifaddrs *ifa_iter = NULL; | |
void *tmp_addr_ptr = NULL; |
./configure --with-emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --with-lispdir=/Users/ngn999/.emacs.d/site-lisp/ --with-texmf-dir=/Users/ngn999/Library/texmf |
require 'formula' | |
class Maven <Formula | |
url 'http://apache.dataguru.cn/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz' | |
head 'http://www.apache.org/dist/maven/binaries/apache-maven-3.0-beta-2-bin.tar.gz' | |
homepage 'http://maven.apache.org/' | |
if ARGV.build_head? | |
md5 'a40881f56a3087828545f30921ff393f' | |
else |
(defun get-previous-indentation () | |
"Get the column of the previous indented line" | |
(interactive) | |
(save-excursion | |
(progn | |
(move-beginning-of-line nil) | |
(skip-chars-backward "\n \t") | |
(back-to-indentation)) | |
(current-column))) |
(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.
在emacs里做url encoding. 最好你的环境是utf-8
(defun url-encode-ty ()
(interactive)
(let* ((origin-string (buffer-substring-no-properties (region-beginning) (region-end)))
;; (new-string (url-hexify-string origin-string))
(new-string
(with-temp-buffer
#!/usr/bin/env perl | |
use strict; | |
use Text::vCard::Addressbook; | |
use XML::Simple qw(:strict); | |
use Data::Dumper; | |
my $address_book = new Text::vCard::Addressbook; | |
my $doc = XMLin('./contacts.xml', KeyAttr => { }, ForceArray => [ 'people', 'phone' ]); | |
foreach my $p (@{$doc->{people}}) { |
# Close Xcode & the iOS Simulator | |
# http://stackoverflow.com/a/30940055 | |
# Remove any old runtimes from this directory. | |
cd /Library/Developer/CoreSimulator/Profiles/Runtimes | |
# e.g. | |
sudo rm -rf iOS\ 8.1.simruntime | |
# http://stackoverflow.com/a/11790983 | |
# Remove the download receipts for simulators you don't need anymore. |