Skip to content

Instantly share code, notes, and snippets.

pragma solidity 0.8.21;
//vulnerable contract, do not use
contract EtherStore {
mapping(address => uint256) public balances;
constructor() payable {
require(msg.value == 1 ether);
}
@ptrcarta
ptrcarta / dcgan_tpu.py
Created April 12, 2020 16:36
dcgan tpu
import os
import tensorflow as tf
from tensorflow import keras
from timeit import default_timer as timer
import matplotlib.pyplot as plt
import numpy as np
IMAGE_DATA_FORMAT = 'channels_last'
keras.backend.set_image_data_format(IMAGE_DATA_FORMAT)
set expandtab
set shiftwidth=4
set makeprg=pylint\ --rcfile=/dev/null\ --reports=n\ --msg-template=\"{path}:{line}:{column}:\ {msg_id}\ {symbol},\ {obj}\ {msg}\"\ \%\ \\\|\ grep\ -E\ '.*:\ [CWEY]'\ \\\|\ sort\ -k1,3
set errorformat=%f:%l:%c:\ %t%n\ %m
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define OF 36
#define ROWS 8
char lookup[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
void print(char *buf) {
int n;
#include <stdlib.h>
#include <stdio.h>
extern char **environ;
int main(void) {
int i = 0;
while (environ[i]) {
puts(environ[i]);
i++;
@ptrcarta
ptrcarta / fizzbuzz.s
Created January 27, 2016 16:31
compile: `as --32 fizzbuzz.s -o fizzbuzz.o; ld -melf_i386 -o fizzbuzz fizzbuzz.o`
.text
.global _start
_start:
#initialize
#can ignore maybe
xor %bh, %bh
sub $0xffff, %esp
movl %esp, %ebp
@ptrcarta
ptrcarta / pomf
Created July 29, 2014 09:50 — forked from KittyKatt/pomf
#!/usr/bin/env bash
# pomf.se uploader
# requires: curl
dest_url='http://pomf.se/upload.php'
return_url='http://a.pomf.se'
if [[ -n "${1}" ]]; then
file="${1}"
if [ -f "${file}" ]; then
@ptrcarta
ptrcarta / pomf
Last active August 29, 2015 14:04 — forked from KittyKatt/pomf
#!/usr/bin/env bash
# pomf.se uploader
# requires: curl
dest_url='http://pomf.se/upload.php'
return_url='http://a.pomf.se'
if [[ -n "${1}" ]]; then
file="${1}"
if [ -f "${file}" ]; then