Skip to content

Instantly share code, notes, and snippets.

Avatar
🐹
#TomsterOnTour

Dawid Pośliński PoslinskiNet

🐹
#TomsterOnTour
View GitHub Profile
@vasind
vasind / ember-cli-build.js
Last active May 11, 2020
Ember CLI performance improvements and tips
View ember-cli-build.js
// 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(),
@mikoscz
mikoscz / elixir_with_asdf_mac.md
Last active Apr 1, 2019
Install elixir with asdf-vm mac os
View elixir_with_asdf_mac.md
  1. 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 \
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

View recording_screencasts.md

Recording

  • Ensure that fullscreen is on
  • Disable spell checker
  • Record using Quicktime (no audio)
  • If possible select rectangle recording area
  • Save with highest possible quality e.g 1920x1080
  • Hide cursor if not needed

KeyCastr / ShowKeys (https://github.com/jmhobbs/ShowKeys)

@swrobel
swrobel / dedup-imovie-library
Last active Sep 30, 2017 — forked from kabadisha/dedup-imovie-library
When you import movies into iMovie 10 libraries, the file is always copied, wasting space and hindering editability. This script replaces the copy with a hardlink, reclaiming disk space.
View dedup-imovie-library
#!/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
@bastman
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// 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
@spalladino
spalladino / mysql-docker.sh
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# 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
@ishu3101
ishu3101 / gist_to_github_repo.md
Created Nov 24, 2015
Transfer a gist to a GitHub repository
View gist_to_github_repo.md

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

@joepie91
joepie91 / delay-promise.js
Last active Jul 3, 2020
ES6 Promise.delay
View delay-promise.js
module.exports = function(duration) {
return function(){
return new Promise(function(resolve, reject){
setTimeout(function(){
resolve();
}, duration)
});
};
};
@hfossli
hfossli / gist:7234623
Last active Jun 3, 2019
KVO on a views geometry
View gist:7234623
- (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];
You can’t perform that action at this time.