Skip to content

Instantly share code, notes, and snippets.

View Felipe00's full-sized avatar
😤
Banzai!

Felipe Costa Felipe00

😤
Banzai!
  • SulAmérica
  • Brazil - PI
View GitHub Profile
package br.com.geifferson.today;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Base64;
import android.util.Log;
@Felipe00
Felipe00 / layout.xml
Last active October 24, 2016 23:51
Alinhamento entre botões
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:id="@+id/activity_cadastro"
android:weightSum="2" <!- O detalhe está aqui
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
@Felipe00
Felipe00 / debug_via_wifi.sh
Created November 23, 2016 16:39 — forked from Folyd/debug_via_wifi.sh
A shell script let you debug android device via WI-FI.
#!/usr/bin/env bash
#Notice: if unable to connect to [ip]:5555,
#try adb kill-server then try again.
adb shell ip route > addrs.txt
#Case 1:Nexus 7
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48
#Case 2: Smartsian T1,Huawei C8813
#default via 192.168.88.1 dev eth0 metric 30
@Felipe00
Felipe00 / debug_via_wifi.sh
Created November 23, 2016 16:39 — forked from Folyd/debug_via_wifi.sh
A shell script let you debug android device via WI-FI.
#!/usr/bin/env bash
#Notice: if unable to connect to [ip]:5555,
#try adb kill-server then try again.
adb shell ip route > addrs.txt
#Case 1:Nexus 7
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48
#Case 2: Smartsian T1,Huawei C8813
#default via 192.168.88.1 dev eth0 metric 30
package com.example.marcin.splitlayout;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Region;
@Felipe00
Felipe00 / SlidingTabLayout.java
Created February 6, 2017 14:50
SlidingTabLayout e SlidingTabStrip atualizados e corrigidos
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
[overhead@localhost hnd-web]$ rails server
/home/overhead/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-1.0.2/lib/concurrent/map.rb:206: warning: constant ::Fixnum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/sprockets-3.6.3/lib/sprockets/digest_utils.rb:47: warning: constant ::Fixnum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/sprockets-3.6.3/lib/sprockets/digest_utils.rb:51: warning: constant ::Bignum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:110: warning: constant ::Fixnum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/gems/sprockets-3.6.3/lib/sprockets/processor_utils.rb:111: warning: constant ::Bignum is deprecated
/home/overhead/.rvm/gems/ruby-2.4.0/
@Felipe00
Felipe00 / example.java
Last active February 16, 2017 03:20
Exemplo de uso de desenho em bitmap
Canvas c = new Canvas(imageBitmap);
Paint p = new Paint();
float[] points = {
10, // start x
10, // start y
80, // stop x
80 // stop x
};
p.setColor(Color.RED);
@Felipe00
Felipe00 / ChangePassword.java
Created February 21, 2017 03:46 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall ([email protected]), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{