Skip to content

Instantly share code, notes, and snippets.

🐹
#TomsterOnTour

Dawid Pośliński PoslinskiNet

🐹
#TomsterOnTour
Block or report user

Report or block PoslinskiNet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DominikDary
DominikDary / .irbrc
Created Jul 14, 2012
IRB Configuration to speed up the development of calabash-android mobile tests.
View .irbrc
require 'rubygems'
require 'irb/completion'
require 'irb/ext/save-history'
ARGV.concat [ "--readline",
"--prompt-mode",
"simple" ]
# 25 entries in the list
IRB.conf[:SAVE_HISTORY] = 50
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
@bstahlhood
bstahlhood / UIImage+Retina4.h
Created Sep 13, 2012
Swizzled UIImage imageNamed for iPhone 5
View UIImage+Retina4.h
//
// UIImage+Retina4.h
// StunOMatic
//
// Created by Benjamin Stahlhood on 9/12/12.
// Copyright (c) 2012 DS Media Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
@vlado
vlado / gist:1877457
Last active Apr 3, 2018
Postgres on macos or OSX - Fix
View gist:1877457
# ** ERROR 1 **
# FATAL: lock file "postmaster.pid" already exists
# HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"?
#
# ** ERROR 2 **
# Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#
# To fix one of this errors:
cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line
@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 \
@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];
@joepie91
joepie91 / delay-promise.js
Last active Dec 25, 2019
ES6 Promise.delay
View delay-promise.js
module.exports = function(duration) {
return function(){
return new Promise(function(resolve, reject){
setTimeout(function(){
resolve();
}, duration)
});
};
};
@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

@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
You can’t perform that action at this time.