Skip to content

Instantly share code, notes, and snippets.

👅
being silly

James Palawaga jpalawaga

👅
being silly
Block or report user

Report or block jpalawaga

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
@jpalawaga
jpalawaga / isuuid5.cc
Created Aug 26, 2019
Is UUID version 5 or not?
View isuuid5.cc
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
int main() {
cout << "Enter uuid: ";
@jpalawaga
jpalawaga / deprecation_example.py
Last active Oct 31, 2016
Using Python Deprecations Correctly
View deprecation_example.py
import warnings
def bad_deprecation():
warnings.warn("Please use new.function()!. Remove by 12/15/2016",
DeprecationWarning)
def good_deprecation():
warnings.warn("Please use new.function()!. Remove by 12/15/2016",
DeprecationWarning, stacklevel=2)
View star.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpalawaga
jpalawaga / gist:c2047e281192714234fe
Created Nov 23, 2014
That one script I use to break that kid's scam site after I was phished.
View gist:c2047e281192714234fe
import os;
import string
import random
from random import sample, choice
chars = string.letters + string.digits
length = 8
f=open('words.txt')
lines=f.readlines()
View gist:10013887
#include <iostream>
class myClass {
private:
int * test;
public:
myClass() {
test = new int(4);
}
int * getPtr() { return test; }
You can’t perform that action at this time.