Skip to content

Instantly share code, notes, and snippets.



Github Sample

import UIKit

class ViewController: UIViewController, UITextFieldDelegate {

    @IBOutlet weak var textField: UITextField!
CavalcanteLeo / range_selection_save_restore.js
Created October 7, 2020 04:52 — forked from timdown/range_selection_save_restore.js
Range and selection marker-element-based save and restore
View range_selection_save_restore.js
* This is ported from Rangy's selection save and restore module and has no dependencies.
* Copyright 2019, Tim Down
* Licensed under the MIT license.
* Documentation:
* Use "rangeSelectionSaveRestore" instead of "rangy"
var rangeSelectionSaveRestore = (function() {
var markerTextChar = "\ufeff";
CavalcanteLeo / build-and-release.yml
Created September 25, 2020 06:32 — forked from gauravssnl/build-and-release.yml
GitHub Actions workflow to build Flutter app and create Release, put this file under `.github/workflows` folder.
View build-and-release.yml
- master
name: Build and Release Apps
name: Build Apps
runs-on: macos-latest
View extensions.json
"id": "aaron-bond.better-comments",
"name": "better-comments",
"publisher": "aaron-bond",
"version": "2.1.0"
"id": "AbhijoyBasak.nestjs-files",
"name": "nestjs-files",
CavalcanteLeo / capitulo1.rst
Created February 12, 2020 13:09 — forked from rodrigomanhaes/capitulo1.rst
Resumo do livro Agile Estimating and Planning, de Mike Cohn
View capitulo1.rst


Mike Cohn

CHAPTER 1. The Purpose of Planning

Plans help to guide investment decisions (this project is worth to begin?), know who needs to be available to work on a project during a given period and know if a project is on track.

View compress all videos in a
bold=$(tput bold)
normal=$(tput sgr0)
original_dir_size=$(du -sh | awk '{print $1}');
for file in $files
CavalcanteLeo / RemoteImageManager.h
Created December 21, 2017 03:04
View RemoteImageManager.h
#import "PINRemoteImageManager.h"
@interface RemoteImageManager : PINRemoteImageManager
+ (instancetype)sharedImageManager;
typedef void (^PINRemoteImageManagerImagePercentageProgressBlock)(float percent);
- (NSUUID *)downloadImageWithURL:(NSURL *)url
CavalcanteLeo / gist:a79e642123664ae928729357caf84ba4
Created October 10, 2017 15:11 — forked from ichord/gist:9808444
demo of using pdf.js to extract pages to images
View gist:a79e642123664ae928729357caf84ba4
<script src=""></script><html>
Created using
Source can be edited via
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->
CavalcanteLeo / BDHost.m
Created September 6, 2017 18:43 — forked from amcgregor/BDHost.m
Useful Objective-C methods, classes, objects, and categories. Basically a snippit collection.
View BDHost.m
// From:
// MIT license
// Remember to add CFNetwork.framework to your project using Add=>Existing Frameworks.
#import "BDHost.h"
#import <CFNetwork/CFNetwork.h>
#import <netinet/in.h>
#import <netdb.h>
#import <ifaddrs.h>
View BaseTabBarController.h
// BaseTabBarController.h
// WeCareWealthManagement
// Created by Leo Cavalcante on 24/07/17.
// Copyright © 2017 Kiddo. All rights reserved.
#import <UIKit/UIKit.h>