Skip to content

Instantly share code, notes, and snippets.

View PrivateGER's full-sized avatar
💭
:)

Latte macchiato PrivateGER

💭
:)
View GitHub Profile
defmodule M do
require Integer
import :math, only: [sqrt: 1]
def main do
IO.puts("Generating large primes...")
IO.puts "Nummer: #{generate_large_number()}"
@PrivateGER
PrivateGER / main.js
Last active December 4, 2018 22:37
Tumblr Downloader
const download = require('download-file');
const request = require('request');
const colors = require("colors");
const path = require("path");
const download_directory = "./download/";
require 'rubygems'
require 'json'
require 'net/http'
require 'time'
$old_id = 0
$total_length = 0
$rant_count = 0
def restore_data
@PrivateGER
PrivateGER / keybase.md
Created January 22, 2018 20:39
keybase.md

Keybase proof

I hereby claim:

  • I am perhapssomeone on github.
  • I am privateger (https://keybase.io/privateger) on keybase.
  • I have a public key ASDD5QXqwJcqQ8Jz9enNuOjxC9XdwhyrQAKHEqynKj-XNwo

To claim this, I am signing this object:

@PrivateGER
PrivateGER / Files.rb
Created January 13, 2018 12:39
Basic Ruby File I/O
file = File.open("Textfile.txt", "w")
file.puts "Sample Textfile"
file.close
@PrivateGER
PrivateGER / Ruby Encryptor.rb
Last active February 8, 2022 10:45
Careful, will encrypt all files in directory except itself.
require 'aes'
require "base64"
def fileEncrypt(file, key)
handler = File.open(file, 'rb')
data = handler.read
handler.close
writefile = File.open(file, "wb")
encryptedContent = AES.encrypt(data, key)
writefile.puts encryptedContent
@PrivateGER
PrivateGER / index.php
Created October 27, 2017 13:59
Easy Coding - PHP Files
<?php
$filehandle = fopen("myfile.txt","w");
fwrite($filehandle,"EasyCoding is cool!");
$filecontent = file_get_contents("myfile.txt");
echo $filecontent;
fclose($filehandle);
?>
@PrivateGER
PrivateGER / index.html
Last active October 26, 2017 19:05
Easy Coding - PHP Form Handling HTML
<html>
<body>
<form action="formhandler.php">
<input type="text">
<button type="submit">Submit</button>
</form>
</body>
</html>
@PrivateGER
PrivateGER / index.html
Created October 26, 2017 18:22
Easy Coding - Simple Login HTML
<!DOCTYPE html>
<html>
<head>
<title>My beautiful login!</title>
</head>
<body>
<form action="authenticate.php" method="post">
<input type="text" name="username" required>
<input type="password" name="password" required>
<button type="submit">Login</button>
@PrivateGER
PrivateGER / authenticate.php
Created October 26, 2017 18:22
Easy Coding - Simple Login PHP
<?php
$sentname = $_POST["username"];
$sentpassword = $_POST["password"];
$failed = false;
if ($sentname == "EasyCoding") {
if ($sentpassword == "EasyCodingPW") {
echo "Logged in successfully!";
//Insert Code to be executed on successful Login here
}