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 | |
| # Handles proper use of Meld from Git. | |
| # | |
| # Instead of launching meld with $MERGED as the base revision, this | |
| # script makes a copy of $BASE and handles copying the result back | |
| # to $MERGED if the result was saved. | |
| # As an extra tweak, it also presents branch names (if known) as | |
| # the file name prefix, instead of just "LOCAL" and "REMOTE". |
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)
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| <?php | |
| $collection = new Doctrine\Common\Collection\ArrayCollection(); | |
| // add objects to the collection that contain a getCreated method returning a DateTime instance | |
| $iterator = $collection->getIterator(); | |
| $iterator->uasort(function ($first, $second) { | |
| if ($first === $second) { |
| <?php | |
| namespace Foo\CoreBundle\Form\EventListener; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\Form\FormEvents; | |
| use Symfony\Component\Form\FormEvent; | |
| use Symfony\Component\Form\FormInterface; | |
| /** | |
| * Changes Form->bind() behavior so that it treats not set values as if they |
| """ | |
| Convert LocationHistory.json from Google takeout of location history (latitude) | |
| to a usable KML file for viewing in Google Earth. | |
| Usage: | |
| python json_history_to_kml.py LocationHistory.json | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>distccd-rpi</string> | |
| <key>Program</key> | |
| <string>/Users/YOUR_USER_NAME/Scripts/launchd-distccd.sh</string> | |
| <key>RunAtLoad</key> | |
| <true/> |
Unfortunately [xinput-calibrator][1] does not work at all for calibrating a
touchscreen in Debian9. This is apparently because X server now uses libinput
to handle input devices instead of evdev. I spent huge amount of trying to
fiddling with xinput-calibrator and 99-calibration.conf files until I finely
found this [issue][2] on GitHub that gave me some hints as how to proceed. This
is mostly for my own reference, but I hope it might also help others in the same
situation.
| #!/usr/bin/env python3 | |
| # Usage: | |
| # PYTHONPATH=src ./train --dataset <file|directory|glob> | |
| # Got 1558M to train on a TITAN RTX using IBM Tensorflow_Large_Model_Support | |
| # TLMS can insert explicit swaps in the graph between GPU and CPU, to extend the memory | |
| # But the graph has While_Loop, so you have to use the TFLMSv2 version (which works with TF 1.x) | |
| # | |
| # Download, expand, get the egg out and install. |