sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
public class PlacePredictionProgrammatically extends AppCompatActivity { | |
private static final String TAG = PlacePredictionProgrammatically.class.getSimpleName(); | |
private EditText queryText; | |
private Button mSearchButton; | |
private TextView mSearchResult; | |
private StringBuilder mResult; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
import Foundation | |
func query(address: String) -> String { | |
let url = URL(string: address) | |
let semaphore = DispatchSemaphore(value: 0) | |
var result: String = "" | |
let task = URLSession.shared.dataTask(with: url!) {(data, response, error) in | |
result = String(data: data!, encoding: String.Encoding.utf8)! |
#! /bin/bash | |
# (@) start-android | |
# If the emulator command exists on this device, displays a list of emulators | |
# and prompts the user to start one | |
# ref. http://stackoverflow.com/questions/7837952/what-is-the-command-to-list-the-available-avdnames | |
# Check if the emulator command exists first | |
if ! type emulator > /dev/null; then | |
echo "emulator command not found" | |
exit 1 |
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 | |
# Streaming with FFMPEG | |
# https://trac.ffmpeg.org/wiki/StreamingGuide | |
ffmpeg -f avfoundation -i "1:0" -c:v libx265 -preset fast -c:a libfdk_aac -b:a 160k test.mkv |
I am not a fan of Xcode. Here are ~160~ 200 problems, the first hundred or so issues were filed mostly in | |
July and August 2016 in a fit of rage. Mostly on weekends working (slowly) on side-projects. I have also | |
taken days of my employer's time filing others of these - so the company was not getting value for my time. | |
I believe a paid intern could have found many of these - just start a screen recorder, and when you see something, | |
stop and cut a quick movie. Many have been around for several major versions. | |
I'm volunteering chunks of my life (15-30 minutes per) to one of the most valuable companies in the world, which seems | |
kind of messed up. Things get worse the more complex the project and the longer Xcode been's running. | |
Apple folks - check out rdar://22524679 |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/usr/bin/env bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |