brew install asdf
echo -e '\n. $(brew --prefix asdf)/asdf.sh' >> ~/.zshrc
echo -e '\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash' >> ~/.zshrc
brew install \
coreutils automake autoconf openssl \
// Credits to the following posts that helps me to reduce build times drastically | |
// https://discuss.emberjs.com/t/tips-for-improving-build-time-of-large-apps/15008/12 | |
// https://www.gokatz.me/blog/how-we-cut-down-our-ember-build-time/ | |
//ember-cli-build.js | |
let EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
let env = EmberApp.env(), |
brew install asdf
echo -e '\n. $(brew --prefix asdf)/asdf.sh' >> ~/.zshrc
echo -e '\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash' >> ~/.zshrc
brew install \
coreutils automake autoconf openssl \
#!/usr/bin/env ruby | |
# Usage: dedup-imovie-library LIBRARY ORIGINALS | |
# | |
# Goes through an iMovie 10 library and replaces all the "Original Media" with | |
# symlinks to the actual original media, in order to conserve disk space. Note | |
# that because they're symlinks, if the path to the originals changes (e.g. you | |
# rename the external drive they are on) then the links will be broken. | |
# | |
# This assumes you've already imported the files into iMovie and waited for them |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
# 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 | |
module.exports = function(duration) { | |
return function(){ | |
return new Promise(function(resolve, reject){ | |
setTimeout(function(){ | |
resolve(); | |
}, duration) | |
}); | |
}; | |
}; |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 300, 200)]; | |
view.backgroundColor = [UIColor blueColor]; | |
[self.view addSubview:view]; | |
[view addObserver:self forKeyPath:@"frame" options:0 context:NULL]; |