Skip to content

Instantly share code, notes, and snippets.

View binho's full-sized avatar

Cleber Santos binho

View GitHub Profile
@binho
binho / caixa_modulo_seguranca_macOS.md
Last active March 25, 2024 11:48
Como instalar/reinstalar o módulo de segurança da Caixa no macOS

Bom vou falar um pouco da minha luta com o Internet Banking da Caixa.

No meu caso tive problemas após migrar o meu macbook para um novo e não conseguia instalar o módulo de segurança no novo macbook e assim sem poder usar o Internet Banking no computador.

Primeiro rodei o script sudo /usr/local/bin/warsaw/uninstall.sh do warsaw como root pra tentar começar tudo do zero mas ainda assim após tentar reinstalar não tive sucesso.

Ao analisar o script postinstall dentro do pkg notei que varios arquivos de inicialização são criados e que alguns dados ainda continuaram no meu computador como certificados e arquivos de inicialização, então tenha certeza que estes arquivos abaixo tenham sido removidos:

rm -f ~/Library/LaunchAgents/com.diebold.warsaw.user.plist
@binho
binho / xcode_targets_check.md
Last active May 23, 2017 10:19
Xcode Build Phase for checking targets

Note: This build phase script should be added in all targets!

TARGET_NAMES=( ShowMe ShowMeDev ShowMeEnterprise )
PREV_TOTAL=0

for TARGET_NAME in "${TARGET_NAMES[@]}"; do
    TOTAL=`XcodeProjectTargetCheck -xcproj ${SRCROOT}/ShowMe.xcodeproj -targets ${TARGET_NAME} | wc -l`
    echo 'Target Name: '${TARGET_NAME} '- Total Files: '${TOTAL}
@binho
binho / magicalrecord_reset_coredata.m
Created April 2, 2015 19:48
MagicalRecord remove and reset CoreData
- (void)resetCoreData {
DDLogInfo(@"[RESET-COREDATA] Started.");
[MagicalRecord cleanUp];
NSURL *storeURL = [NSPersistentStore MR_urlForStoreName:kMobilStoreName];
NSURL *walURL = [[storeURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sqlite-wal"];
NSURL *shmURL = [[storeURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"sqlite-shm"];
@binho
binho / fibo_objc.m
Created December 26, 2016 11:51
Fibonnaci Objective-C (Returns an array)
- (NSArray *)fibonnaci:(NSNumber *)number {
NSMutableArray *array = [NSMutableArray new];
for (int i = 0; i < [number intValue]; i++) {
if (i < 2) {
[array addObject:@(i)];
} else {
int fib = ([array[i-1] intValue] + [array[i-2] intValue]);
[array addObject:@(fib)];
}
@binho
binho / viewModelTest.m
Created December 21, 2016 12:48
Testing view model in XCTest
#import <XCTest/XCTest.h>
#import "Person.h"
#import "PersonViewModel.h"
@interface SimpleMVVMTests : XCTestCase
@property (nonatomic) NSString *salutation;
@property (nonatomic) NSString *fullName;
@property (nonatomic) NSDate *birthDate;
#!/bin/bash
DIRECTORY=$1
echo "------------------------------"
echo "Passed Resources with xcassets folder argument is <$DIRECTORY>"
echo "------------------------------"
XC_ASSETS="$(find "$DIRECTORY" -name '*.xcassets')"
for xcasset in $XC_ASSETS; do
echo "-- 📦 XC Asset: $xcasset"
@binho
binho / localization-report.py
Last active September 22, 2016 12:47
Localization Report
#!/usr/bin/python
# -*- coding: utf-8 -*-
import fnmatch
import sys
import os
num_strings_base = 0
strings_on_base = []
@binho
binho / download-subtitles.py
Last active September 1, 2016 19:52
Download subtitles using subliminal lib (https://github.com/Diaoul/subliminal)
#!/usr/bin/python
# -*- coding: utf-8 -*-
from datetime import timedelta
from babelfish import Language
from subliminal import download_best_subtitles, region, save_subtitles, scan_videos
import sys
import os
"""
@binho
binho / vertical_block.html
Created January 21, 2014 10:24
bloqueia site na vertical
<!-- CSS -->
<style type="text/css">
/* verifica se esta na vertical ou horizontal */
#aviso-vertical { display: none; background:red; color:white; padding:20px; margin-top:100px; }
#aviso-vertical p { text-align:center; font-family: 'Trebuchet MS'; margin-left: -295px; font-size:22px; }
@media only screen and (orientation:portrait) {
#container { display:none; }
#aviso-vertical { display:block; }
}
@media only screen and (orientation:landscape) {
@binho
binho / android.sh
Last active December 30, 2015 05:59
Gerar chave para validação Android
# generate key example
keytool -genkey -v -keystore maxwal.keystore -alias maxwal -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Maxwal, OU=Maxwal, S=São Paulo, C=BR"