Skip to content

Instantly share code, notes, and snippets.

View PsHegger's full-sized avatar

Gergely Hegedüs PsHegger

View GitHub Profile
@PsHegger
PsHegger / flask_init.sh
Created February 8, 2019 10:26
A simple script to create a basic Flask app
#!/usr/bin/env bash
echo "Creating project directory"
mkdir $1
cd $1
echo "Initializing virtual environment"
python3 -m venv venv
. venv/bin/activate
pip install Flask > pip.log
@PsHegger
PsHegger / bfc.c
Last active November 15, 2016 14:12
Simple BrainFck compiler
// Copyright 2016 Gergely Hegedüs
//
// 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
// distributed under the License is distributed on an "AS IS" BASIS,

Keybase proof

I hereby claim:

  • I am pshegger on github.
  • I am pshegger (https://keybase.io/pshegger) on keybase.
  • I have a public key whose fingerprint is DEF3 A310 B451 3FF0 8B29 CD4F 76C3 E614 6820 77E1

To claim this, I am signing this object:

@PsHegger
PsHegger / RootDetector.java
Created June 2, 2016 12:17
A simple class for Android developers to detect whether the device is rooted
package io.github.pshegger.simplerootdetector;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import java.io.File;
import java.util.Arrays;
import java.util.List;
@PsHegger
PsHegger / flying_eagle
Created January 23, 2015 09:07
Flying eagle
function pinterIstvan() {
var sasDiv = document.getElementById("sasDiv");
if (!sasDiv) {
sasDiv = document.createElement("div");
sasDiv.setAttribute("id", "sasDiv");
sasDiv.style.position = "fixed";
sasDiv.style.zIndex = "99999999";
var sasImg = document.createElement("img");