Skip to content

Instantly share code, notes, and snippets.

View jheto's full-sized avatar

Luis Fernando Obando Velez jheto

View GitHub Profile
Run the following commands with Administrator privileges.
Disable UAC
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
Enable UAC
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
@jheto
jheto / Abstract Factory
Last active June 9, 2016 16:41
Java Pattern's
public interface Shape {
void draw();
}
public class Rectangle implements Shape {
@Override
public void draw() {
System.out.println("Inside Rectangle::draw() method.");
}
@jheto
jheto / MyActivity.java
Created May 13, 2016 20:34 — forked from ErikHellman/MyActivity.java
Simple LocalBinder demo for Android
package se.hellsoft.simpleservicecallbackdemo;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
git reset --hard HEAD~1
git push --force
@jheto
jheto / ChangePassword.java
Created January 19, 2016 22:59 — 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
{