Skip to content

Instantly share code, notes, and snippets.

View licvido's full-sized avatar

Filip Mikovcak licvido

View GitHub Profile
@licvido
licvido / app.swift
Last active October 3, 2015 18:25
SWIFT: Hide separator line from from empty cells
/*
* DEMO - https://github.com/dasdom/TableViewFooterDemo
*/
self.tableView.tableFooterView = UIView(frame: CGRect.zeroRect) // that's it!
@licvido
licvido / database.php
Last active January 15, 2016 17:44
NETTE: Database connection sample
<?php
require 'nette.phar';
Tracy\Debugger::enable();
$dsn = "mysql:host=localhost;dbname=database";
$user = "root";
$password = "***";
@licvido
licvido / app.swift
Created September 11, 2015 14:04
SWIFT: Singleton
class DeathStarSuperlaser {
static let sharedInstance = DeathStarSuperlaser()
private init() {
// Private initialization to ensure just one instance is created.
}
}
let laser = DeathStarSuperlaser.sharedInstance
@licvido
licvido / terminal.sh
Created September 8, 2015 14:10
OSX: Kill all Simulator processes
killall "iOS Simulator"
<?php
require 'nette.phar';
//Tracy\Debugger::enable();
$dns = "mysql:host=localhost;dbname=database";
$user = "user";
$password = "*****";
---
# ^^^ 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 / app.swift
Last active September 18, 2015 06:02
SWIFT: Button with border
button.backgroundColor = UIColor.clearColor()
button.layer.cornerRadius = 5
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.whiteColor().CGColor
@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)