Skip to content

Instantly share code, notes, and snippets.

View licvido's full-sized avatar

Filip Mikovcak licvido

View GitHub Profile
@licvido
licvido / gist:87c1eee32b90b44d0b7e2fa09ea63cc7
Last active January 10, 2018 19:53 — forked from wavecos/gist:4dcb1410a41b9dd521cb
Present Modal ViewController when tap a TabBarItem (like camera VC in Instagram)
// 1. First Create a Dummy UIViewController that has a root relation with the UITabBarController
// 2. Make this controller implement a UITabBarControllerDelegate
// 3. In ViewDidLoad:
override func viewDidLoad() {
super.viewDidLoad()
self.tabBarController?.delegate = self
}
// 4. Implement this delegate method:
func tabBarController(tabBarController: UITabBarController, didSelectViewController viewController: UIViewController) {
let isModalTab = viewController == self
@licvido
licvido / README-Template.md
Created August 12, 2016 07:29 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

@licvido
licvido / README.md
Created August 12, 2016 07:28 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@licvido
licvido / redmine-3.2.1-on-ubuntu-14.04
Last active August 24, 2018 11:46 — forked from wenzhixin/redmine-3.0.2-on-ubuntu-14.04
redmine 3.2.1 installer on ubuntu 14.04 (new installtion) with nginx, mysql and puma
# set cache proxy
sudo vi /etc/apt/apt.conf << EOT
Acquire::http::Proxy "http://192.168.88.10:3142";
Acquire::HTTP::Proxy::192.168.88.10 "DIRECT";
EOT
sudo apt-get update
sudo apt-get upgrade
@licvido
licvido / ubuntu-php7-install.bash
Created March 25, 2016 01:30
Ubuntu 14.04 PHP7 (Install from Source)
#!/usr/bin/env bash
sudo -i;
apt-get update;
apt-get install --yes \
git \
bison \
autoconf \
@licvido
licvido / git.migrate
Created October 16, 2015 10:26 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

Free disk space when /boot is full (Ubuntu)

TL;DR

dpkg -l linux-image*
uname -r
sudo apt-get remove linux-image-2.6.32-{21,37,38,39,40,41,42,43,44}-server
sudo apt-get autoremove
@licvido
licvido / RBResizer.swift
Last active September 18, 2023 11:36 — forked from HamptonMakes/RBResizer.swift
SWIFT: Crop image to square (& resize)
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
//
import UIKit
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)