Skip to content

Instantly share code, notes, and snippets.

View diegoperini's full-sized avatar
🎹
Focusing

Diego Perini diegoperini

🎹
Focusing
View GitHub Profile
@diegoperini
diegoperini / signasdebug.sh
Last active May 20, 2021 11:07 — forked from doublerebel/signasdebug.sh
Sign apk with Android default debug keystore. Required for TestFlight module to recognize build as debug. Titanium Mobile signs with its own tirocks keystore by default.
cp app-unsigned.apk temp.apk
jarsigner -verbose -keystore ~/.android/debug.keystore -digestalg SHA1 -sigalg MD5withRSA -storepass android -keypass android temp.apk androiddebugkey
~/Library/Android/sdk/build-tools/30.0.3/zipalign -v 4 temp.apk temp.apkz
mv temp.apkz app-signed.apk && rm temp.apk
@diegoperini
diegoperini / run-in-docker.sh
Created November 19, 2020 15:15
Shell/bash boilerplate for running commands in docker
#!/bin/sh
# Setup container
##################################
CONTAINER_NAME="tempcontainer"
CONTAINER_BASE_IMAGE="amazonlinux:2"
(docker kill $CONTAINER_NAME && docker rm $CONTAINER_NAME) || echo Nothing to kill from previous run, starting a fresh install
SELINUX_SUFFIX=""
@diegoperini
diegoperini / task.yml
Created November 4, 2020 15:47 — forked from maxim/task.yml
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
@diegoperini
diegoperini / is-running-in-docker.bash
Created November 3, 2020 15:06
Bash command to check if running in a Docker container
(cat /proc/1/cgroup | grep -m 1 docker > /dev/null && echo docker) || echo baremetal
@diegoperini
diegoperini / flutter-20-tf-update.md
Created November 3, 2020 11:00
Dart 2 update guide for TestFairy

To be able to use TestFairy Flutter Plugin 2.+, you must have the environment specified below and upgrade your project code base to Dart 2 using this guide.

environment:
  sdk: ">=2.10.0 <3.0.0"
  flutter: ">=1.22.0 <2.0.0"

Make sure your project root has an analysis_options.yaml that looks similar to this. The important part is the enabled experiment in the top declaration.

@diegoperini
diegoperini / test_ciphers.bash
Created January 22, 2020 22:33
How to get supported ciphers list from an endpoint
#!/usr/bin/env bash
# Source: https://superuser.com/a/224263
# Usage: bash test_ciphers.bash example.com:443
# OpenSSL requires the port number.
SERVER=$1
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')

Telefon Güvenliği

Mevcut cep telefonunuzdaki uzaktan erişim ve takip özelliklerini tamamen kapatabilmek için uygulamanız gereken adımlar aşağıdaki gibidir. Telefonunuzun markasına göre size uyan başlıktaki talimatlara uyabilirsiniz. Bu talimatları uygulamaya başlamadan önce cihazın şarj seviyesini en az %50'ye getirmeniz, telefon dilini Türkçe'ye geçirmeniz ve rehber, fotoğraflar gibi kişisel bilgilerin bir yedeğini almanız tavsiye edilir. Bu yedekleri akıllı telefon uygulamaları ile değil, manuel yollarla (bir kağıda yazmak, USB kablo ile bilgisayara aktarmak gibi) yapmanız daha uygundur.

Tüm Cihazlar İçin Talimatlar

  1. Mümkünse eposta adresinizi terkedin.
  2. Eposta adresini terkedemiyorsanız önce internet üzerinden eposta hizmetinize giriş yapın.
  3. Hizmet sağlayıcınızın güvenlik ayarlarına ilerleyin.
  4. Varsa, daha önceden tanımlı bütün şifre kurtarma (recovery) adreslerini silin.
  5. Varsa, daha önceden tanımlı bütün şifre kurtarma (recovery) telefon numaralarını silin.
  6. Şifrenizi değiştirin.
@diegoperini
diegoperini / TouchProxyView.swift
Last active March 4, 2019 16:02
A parent view to redirect touch events to its first child, can be used to extend scrollable area of a small UIScrollView
// Make sure you disable user interractions on the first child of this view
class TouchProxyView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
# This is my personal Atom editor profile
@diegoperini
diegoperini / ListViewScrollTracker.java
Created February 25, 2016 12:23 — forked from cnnrhill/ListViewScrollTracker.java
Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the position of child views.
import android.util.SparseArray;
import android.widget.AbsListView;
/**
* Helper class for calculating relative scroll offsets in a ListView or GridView by tracking the
* position of child views.
*/
public class ListViewScrollTracker {
private AbsListView mListView;
private SparseArray<Integer> mPositions;