Skip to content

Instantly share code, notes, and snippets.

View Morbix's full-sized avatar

Henrique Morbin Morbix

  • iFood
  • Porto, Portugal
  • 10:19 (UTC +01:00)
View GitHub Profile
@diegopacheco
diegopacheco / fake-server-chaos.py
Created November 22, 2016 12:14
FAKE Simple Chaos Server in Python
#
# before run $ sudo -E pip install Flask
#
# To run: $ python fake-server-chaos.py
#
#
from flask import Flask, request
import time
from threading import Thread
@diegopacheco
diegopacheco / linux-files-bigger100mb.md
Created October 31, 2016 16:26
Linux List all files bigger than 100MB
sudo find / -size +100M -exec sudo ls -l {} \;
@yuhua-chen
yuhua-chen / Drag-and-drop-uitableviewcell-swift2.swift
Created August 6, 2015 09:12
Demo the drag and drop UITableViewCell in Swift 2.
struct Drag {
static var placeholderView: UIView!
static var sourceIndexPath: NSIndexPath!
}
func handleLongPress(gesture: UILongPressGestureRecognizer) {
let point = gesture.locationInView(tableView)
let indexPath = tableView.indexPathForRowAtPoint(point)
switch gesture.state {