Skip to content

Instantly share code, notes, and snippets.

View LucasMW's full-sized avatar

Lucas Menezes LucasMW

View GitHub Profile
@LucasMW
LucasMW / translation_script.dart
Created February 18, 2022 16:30
translation_script.dart helps generate AppLocalizations for Flutter projects.
import 'dart:convert';
import 'dart:io';
import 'package:csv/csv.dart';
const projectPaTH = "."; //EDIT THIS
const enPath = '$projectPATH/lib/assets/l10n/app_en.arb';
const esPath = '$projectPATH/lib/assets/l10n/app_es.arb';
const ptPath = '$projectPATH/lib/assets/l10n/app_pt.arb';
String toCapitalized(String x) {
//
// ImageCache.swift
// MWN - Minimal World News
//
// Created by Lucas Menezes on 1/22/20.
// Copyright © 2020 Lucas Menezes. All rights reserved.
//
import UIKit
@LucasMW
LucasMW / keybase.md
Created January 13, 2020 20:21
keybase

Keybase proof

I hereby claim:

  • I am lucasmw on github.
  • I am lucasmw (https://keybase.io/lucasmw) on keybase.
  • I have a public key ASD6j5Crd78ph9hEx2Tfx5mvL3MrndGFIdRgCuE9AJAaIwo

To claim this, I am signing this object:

@LucasMW
LucasMW / pow.bf
Created December 9, 2019 20:12
Interactive Power of Shorts in Brainfuck
Generated by HAC (HeadAche Comp)
CL
>+<[>-]>[->+>[<-]<[<]>[-<+>]]<-[+<>+<[>-]>[->>-<]<<->+<[>-]>[->+>[<-]<[<]>[-<+>]]<-]<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+<+[>-]>[->>+<]<<>+
@LucasMW
LucasMW / podSearchFix.sh
Created September 26, 2018 18:49
Fix Pod Search
rm ~/Library/Caches/CocoaPods/search_index.json
pod search
@LucasMW
LucasMW / instruction.md
Last active October 9, 2018 13:23
Open files containing the word "x" and file name contains "y"

Requires ag (The Silver Searcher)

brew install ag

General formula:

ide $(ag x -G y -l)

Example:

Open with android studio all files from current direct containing the word "order" and file name contains Activity.java

studio $(ag order -G Activity.java -l)

@LucasMW
LucasMW / script.sh
Last active March 30, 2022 11:02
99 bottles of beer demonstration script
#Provide simple demonstration of the power of Headache
git clone -b master --single-branch http://github.com/LucasMW/Headache;
cd Headache;
make;
make bfi;
./hac -noBin examples/bottlesofbeer.ha >/dev/null;
time say --voice=Daniel $(./bfi a.bf)
@LucasMW
LucasMW / forgive.brainfuck
Created December 8, 2017 15:50 — forked from aerok/forgive.brainfuck
brainfuck
+++++++ [ > ++++++++++ < - ] > -- . > ++++++++++ [ > ++++++++++ < - ] > --- . > +++++++++++ [ > ++++++++++ < - ] > ++++ . ------ . --- . +++++ . > ++++++++++ [ > ++++++++++ < - ] > +++ . > ++++ [ > +++++++++++ < - ] > . > +++++ [ > ++++++ < - ] > ++ . > ++++++++++ [ > ++++++++++ < - ] > ++ . > +++++++++++ [ > ++++++++++ < - ] > + . +++ . < < + . ++ . > > ++++ . << ---- . >>> +++++ [ > ++++++ < - ] > ++ . > +++++++++++ [ > ++++++++++ < - ] > - . > ++++++++++ [ > ++++++++++ < - ] > + . > +++++++++ [ > +++++++ < - ] > . [-]++++++++++.
@LucasMW
LucasMW / powOfshorts.bf
Last active February 3, 2020 11:37
Power of shorts in brainfuck
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<++ 2 as short
<<<<<<<<<<<<<<<<>+<[>-]>[->+>[<-]<[<]>[-<+>]]<-[+<>+<[>-]>[->>-<]<<->+<[>-]>[->+>[<-]<[<]>[-<+>]]<-]<>>>>>>>>>>>>>>>>>+<[>-]>[->+>[<-]<[<]>[-<+>]]<-[+<<<<<<<<<<<<<<<<<>+<+[>-]>[->>+<]<<>>>>>>>>>>>>>>>>>+<[>-]>[->>-<]<<->+<[>-]>[->+>[<-]<[<]>[-<+>]]<-]<Assign
>>>>>>>>++++++++++ 10 as short
Change both shorts if you wanna pow different numbers; Do not change the assign line; Do not
change any other part of the program;
let url = URL(string: "https//api.meusite.org")
do {
let data = try Data(contentsOf: url!)
let json = try JSONSerialization.jsonObject(with: data, options:.allowFragments)
let array = json as! [String: Any]
for (key,data) in array {
let dict = data as! [String : Any]
//print(key)
//print(data)