Skip to content

Instantly share code, notes, and snippets.

View rohitshampur's full-sized avatar

Rohit Shampur rohitshampur

View GitHub Profile
{
"enabled": "true",
"preferences": {
"EVENT": [
"EMAIL",
"PUSH"
],
"BLOG": [
"EMAIL",
"PUSH"
@rohitshampur
rohitshampur / LoginController.java
Created July 12, 2017 10:49 — forked from jewelsea/LoginController.java
JavaFX sample for an fxml based Login screen to main application transition with login session data transfer
package login;
import javafx.event.*;
import javafx.fxml.FXML;
import javafx.scene.control.*;
/** Controls the login screen */
public class LoginController {
@FXML private TextField user;
@FXML private TextField password;
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
if (project.hasProperty("android")) { // Android libraries
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
apply plugin: 'com.github.dcendents.android-maven'
group = publishedGroupId // Maven Group ID for the artifact
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
@rohitshampur
rohitshampur / crypto.py
Last active December 19, 2021 12:51
Mimic Java's PBEWithMD5AndDES algorithm to produce a DES key
from Crypto.Hash import MD5
from Crypto.Cipher import DES
import re
import base64
_password = '111' #use your own pass key
_salt = '\xA9\x9B\xC8\x32\x56\x35\xE3\x03' #use your salt here
_iterations = 19 #change iterations here
@rohitshampur
rohitshampur / gothongame.py
Last active August 29, 2015 12:49
Code for Gothons From Planet Percal #25 from the book Learn python the hardway
from sys import exit
from random import randint
class Scene(object):
def enter(self):
print "This scene is not yet configured. Subclass it and implement enter()."
exit(1)
class Engine(object):