Skip to content

Instantly share code, notes, and snippets.

@CavalcanteLeo
CavalcanteLeo / PT v2.xliff
Last active May 30, 2023 13:33
PopcornTimeTV translate
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
<file original="PopcornTime/Base.lproj/LoadingView.xib" source-language="en" target-language="Language code goes here" datatype="plaintext">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="8.3" build-num="8E162"/>
</header>
<body>
<trans-unit id="9zp-GC-F8p.text">
<source>LOADING</source>
<target>CARREGANDO</target>
</trans-unit>

KeyBoardToolBar

Github Sample

import UIKit

class ViewController: UIViewController, UITextFieldDelegate {

    @IBOutlet weak var textField: UITextField!
@CavalcanteLeo
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
/**
* 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: https://github.com/timdown/rangy/wiki/Selection-Save-Restore-Module
* Use "rangeSelectionSaveRestore" instead of "rangy"
*/
var rangeSelectionSaveRestore = (function() {
var markerTextChar = "\ufeff";
@CavalcanteLeo
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.
on:
push:
branches:
- master
name: Build and Release Apps
jobs:
build:
name: Build Apps
runs-on: macos-latest
[
{
"id": "aaron-bond.better-comments",
"name": "better-comments",
"publisher": "aaron-bond",
"version": "2.1.0"
},
{
"id": "AbhijoyBasak.nestjs-files",
"name": "nestjs-files",
@CavalcanteLeo
CavalcanteLeo / capitulo1.rst
Created February 12, 2020 13:09 — forked from rodrigomanhaes/capitulo1.rst
Resumo do livro Agile Estimating and Planning, de Mike Cohn

AGILE ESTIMATING AND PLANNING

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.

bold=$(tput bold)
normal=$(tput sgr0)
files='*.mp4'
original_dir_size=$(du -sh | awk '{print $1}');
original_dir_size_int=${original_dir_size:0:${#original_dir_size}-1}
for file in $files
@CavalcanteLeo
CavalcanteLeo / .zshrc
Last active April 5, 2018 17:54
style and aliases for .zshrc
export ZSH=/Users/Leo-KiddoLabs/.oh-my-zsh
export TERM="xterm-256color"
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
plugins=(git git-extras github atom)
ZSH_THEME="LeoTerminal"
@CavalcanteLeo
CavalcanteLeo / RemoteImageManager.h
Created December 21, 2017 03:04
DownloadProgressPinRemoteImageManager
#import "PINRemoteImageManager.h"
@interface RemoteImageManager : PINRemoteImageManager
+ (instancetype)sharedImageManager;
typedef void (^PINRemoteImageManagerImagePercentageProgressBlock)(float percent);
- (NSUUID *)downloadImageWithURL:(NSURL *)url
options:(PINRemoteImageManagerDownloadOptions)options
@CavalcanteLeo
CavalcanteLeo / gist:a79e642123664ae928729357caf84ba4
Created October 10, 2017 15:11 — forked from ichord/gist:9808444
demo of using pdf.js to extract pages to images
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit
-->
<body>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->