Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
# Next time you need to install something with python setup.py -- which should be never but things happen. | |
python setup.py install --record files.txt | |
# This will cause all the installed files to be printed to that directory. | |
# Then when you want to uninstall it simply run; be careful with the 'sudo' | |
cat files.txt | xargs sudo rm -rf | |
using System; | |
using System.Threading.Tasks; | |
namespace Life | |
{ | |
public class LifeSimulation | |
{ | |
private bool[,] world; | |
private bool[,] nextGeneration; | |
private Task processTask; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/bin/bash | |
# from | |
# http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html | |
convert source-WxW.png -resize 256x256 -transparent white favicon-256.png | |
convert favicon-256.png -resize 16x16 favicon-16.png | |
convert favicon-256.png -resize 32x32 favicon-32.png | |
convert favicon-256.png -resize 64x64 favicon-64.png | |
convert favicon-256.png -resize 128x128 favicon-128.png |
#import <ApplicationServices/ApplicationServices.h> | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 2) | |
return 0; | |
NSAutoreleasePool *pool = [NSAutoreleasePool new]; | |
CFStringRef name = (CFStringRef) [NSString stringWithUTF8String: argv[1]]; |
http://devstreaming.apple.com/videos/wwdc/2013/710xfx3xn8197k4i9s2rvyb/710/710-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/202xdx2x47ezp1wein/202/202-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/200xdx2x35e1pxiinm/200/200-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/413xdx5x97itb5ek4yex3r7/413/413-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/612xax4xx65z1ervy5np1qb/612/612-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/221xex4xxohbllf4hblyngt/221/221-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/220xbx4xipaxfd1tggxuoib/220/220-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/711xcx4x8yuutk8sady6t9f/711/711-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/404xbx2xvp1eaaqonr8zokm/404/404-HD.mov?dl=1 | |
http://devstreaming.apple.com/videos/wwdc/2013/505xbx4xrgmhwby4oiwkrpp/505/505-HD.mov?dl=1 |
#!/usr/bin/env bash | |
# Usage: bash uninstall_vmware.bash | |
remove() { | |
entry="$1" | |
echo -ne "Removing \e[1;34m$entry\e[0m... " | |
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log | |
if [[ ! -e "$entry" ]]; then | |
echo -e "\e[1;32mOK\e[0m" |
def get_count(q): | |
count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
count = q.session.execute(count_q).scalar() | |
return count | |
q = session.query(TestModel).filter(...).order_by(...) | |
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
print q.count() |