Skip to content

Instantly share code, notes, and snippets.

View JCarlosR's full-sized avatar
🏠
Working from home

Juan Ramos JCarlosR

🏠
Working from home
View GitHub Profile
@JCarlosR
JCarlosR / PreferenceHelper.kt
Last active December 25, 2023 08:20 — forked from krupalshah/PreferenceHelper.kt
Helper for shared preferences management - Kotlin version
package com.programacionymas.helpers
import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
object PreferenceHelper {
fun defaultPrefs(context: Context): SharedPreferences
= PreferenceManager.getDefaultSharedPreferences(context)
@evanwill
evanwill / gitBash_windows.md
Last active April 26, 2024 03:58
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@nelyj
nelyj / facebook.py
Created October 14, 2015 19:30
facebook.py Modificado - Facebook brute force - Hacking Chile convesation
#!usr/bin/python
#Facebook Cracker Version 2.1 can crack into Facebook Database 100% without Interruption By Facebook Firewall !
#This program is for educational purposes only.
#Don't attack people facebook accounts it's illegal !
#If you want to crack into someone's account, you must have the permission of the user.
#Mauritania Attacker is not responsible.
import sys
import random
@mziwisky
mziwisky / Oauth2.md
Last active February 15, 2024 23:31
Oauth2 Explanation

OAUTH2

The Problem

I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.

The Solution

I can’t trust the other web apps, so I must interact with my users directly. I’ll let them know that the other app is trying to get their info, and ask whether they want to grant that permission. Oauth defines a way to initiate that permission verification from the other app’s site so that the user experience is smooth. If the user grants permission, I issue an AuthToken to the other app which it can use to make requests for that user's info.

Note on encryption

Oauth2 has nothing to do with encryption -- it relies upon SSL to keep things (like the client app’s shared_secret) secure.