This file contains 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
# CLOSURES IN RUBY Paul Cantrell https://innig.net | |
# Email: username "paul", domain name "innig.net" | |
# I recommend executing this file, then reading it alongside its output. | |
# | |
# Alteratively, you can give yourself an unreasonable Ruby test by deleting all | |
# the comments, then trying to guess the output of the code! | |
# | |
# (Naive HR departments, please do not use that idea as a hiring quiz.) |
This file contains 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
# delete each file from stdin delimited by space or newline | |
xargs -n1 rm | |
# delete each file found using find (ex w/ .ds_store) | |
find . -name .DS_STORE | xargs -n1 rm | |
# for each url in urls run curl, grep some other url and then download each | |
# of these urls | |
cat urls | xargs -n1 -I{} sh -c "curl -s {} | grep $OTHERURL" | xargs -n1 wget |
This file contains 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
#!/usr/bin/osascript | |
-- Save as fullscreener.applescript | |
tell application "Finder" | |
set {x1, y1, x2, y2} to (bounds of window of desktop) | |
end tell | |
tell application "System Events" | |
repeat with aProcess in processes |
This file contains 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
FROM ubuntu | |
# make sure the package repository is up to date | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
# set up root:root and me:me |
This file contains 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
me@e9a280256320:~$ sudo apt-get install libtool autoconf automake cmake libncurses5-dev g++ pkg-config | |
[sudo] password for me: | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
autotools-dev binutils bsdmainutils cmake-data cpp cpp-4.6 emacsen-common file g++-4.6 gcc gcc-4.6 libarchive12 libasn1-8-heimdal libc-dev-bin libc6-dev libclass-isa-perl libcurl3 libcurl3-gnutls libgcrypt11 libgdbm3 libgmp10 | |
libgnutls26 libgomp1 libgpg-error0 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkrb5-26-heimdal libldap-2.4-2 libltdl-dev libltdl7 libmagic1 libmpc2 libmpfr4 libnettle4 | |
libp11-kit0 libquadmath0 libroken18-heimdal librtmp0 libsasl2-2 libsasl2-modules libstdc++6-4.6-dev libswitch-perl libtasn1-3 libtinfo-dev libwind0-heimdal libxml2 libxmlrpc-core-c3 linux-libc-dev m4 manpages manpages-dev perl | |
perl-modules sgml-base xml-core |