Skip to content

Instantly share code, notes, and snippets.

Angeloped angeloped

  • Philippines
Block or report user

Report or block angeloped

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@angeloped
angeloped / Public and Private Key PGP Validator
Last active Feb 12, 2020
Public and Private Key PGP Validator | RegEx
View Public and Private Key PGP Validator
/^(-----BEGIN PGP PUBLIC KEY BLOCK-----).*([a-zA-Z0-9//\n\/\.\:\+\ \=]+).*(-----END PGP PUBLIC KEY BLOCK-----)$|^(-----BEGIN PGP PRIVATE KEY BLOCK-----).*([a-zA-Z0-9//\n\/\.\:\+\ \=]+).*(-----END PGP PRIVATE KEY BLOCK-----)$/
@angeloped
angeloped / generate-ssh-key.sh
Created Feb 12, 2020 — forked from grenade/generate-ssh-key.sh
Correct file permissions for ssh keys and config.
View generate-ssh-key.sh
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@angeloped
angeloped / spongebobify.py
Last active Jan 2, 2020
ThIsS iS jUsT aNotHeR sPoNgeBoB fOrMatTeR. View revisions for other version.
View spongebobify.py
import random
def sPongEbOb_iT(data):
return "".join([random.choice([s, s.upper()]) for s in data])
@angeloped
angeloped / puzzle.py
Last active Dec 29, 2019
Standard Problem Solver For Proof-of-Work System.
View puzzle.py
import os
from hashlib import sha512
def authBlock():
pass
# auth hash before inserting into blockchain
def authHashPOW(ref):
with open("HashPOWs","a+") as f:
for line in f:
@angeloped
angeloped / autocrop_center_square.php
Created Dec 16, 2019
Crop image from center and output a square cropped image; written in PHP language.
View autocrop_center_square.php
<?php
function cropAlign($image, $cropWidth, $cropHeight, $horizontalAlign = 'center', $verticalAlign = 'middle') {
$width = imagesx($image);
$height = imagesy($image);
$horizontalAlignPixels = calculatePixelsForAlign($width, $cropWidth, $horizontalAlign);
$verticalAlignPixels = calculatePixelsForAlign($height, $cropHeight, $verticalAlign);
return imageCrop($image, [
'x' => $horizontalAlignPixels[0],
'y' => $verticalAlignPixels[0],
'width' => $horizontalAlignPixels[1],
@angeloped
angeloped / geoip.py
Created Nov 22, 2019
IP Tracking System with ip-api. Compatible in Python 2.x and 3.x. Try it!
View geoip.py
import json
import requests
import webbrowser
def _input(form):
try:
return raw_input(form)
except:
return input(form)
@angeloped
angeloped / bcpirates.js
Created Nov 19, 2019
The bandcamp pirates. ;P
View bcpirates.js
/*
* title: The bandcamp pirates.
* coded by: Bryan Angelo Pedrosa
* date: 19 November 2019
*/
/* to download album (free version) */
window.location=TralbumData["freeDownloadPage"]
@angeloped
angeloped / AnSyn_salary_microeconomics.py
Created Oct 31, 2019
Anarcho-Syndicalism/Anarcho-Collectivist salary distribution system. 100% legit no scam. Accurate calaculation.
View AnSyn_salary_microeconomics.py
#!/usr/bin/python
from __future__ import division
"""
name: AnSyn_salary_microeconomics.py
description: Anarcho-Syndicalism/Anarcho-Collectivist salary distribution system. 100% legit no scam. Accurate calaculation.
author: Bryan Angelo Pedrosa
min_salary - the standard minimum pay. no matter what happen.
peak_salary - highest pay if average income per worker reached peak.
@angeloped
angeloped / lotto.py
Last active Oct 27, 2019
lotto lucky number guesser... (for PCSO Lotto only)
View lotto.py
#!/usr/bin/python
import time
from random import random
from bisect import bisect
def probdist_choice(choices):
values, weights = zip(*choices)
total = 0
cum_weights = []
@angeloped
angeloped / data_compressor.py
Created Oct 2, 2019
Lossless data compression code snippet with the help of zlib DEFLATE (Lempel–Ziv 1977) compression algorithm.
View data_compressor.py
#!/bin/python
import base64
import zlib
import sys
"""
name: data_compressor.py
description: Lossless data compression code snippet with the help of zlib DEFLATE (Lempel–Ziv 1977) compression algorithm.
author: Bryan Angelo Pedrosa
"""
You can’t perform that action at this time.