Metadata in PDF files can be stored in at least two places:
- the Info Dictionary, a limited set of key/value pairs
- XMP packets, which contain RDF statements expressed as XML
#!/bin/bash | |
# Checks all directories in cwd for compromised eslint version | |
cwd=$PWD | |
for d in `find . -maxdepth 1 -type d`; do | |
cd $d | |
version=$(npm ls 2> /dev/null | grep eslint@ | sed -e 's/.*eslint@\([0-9.]*\).*/\1/') | |
if [ -n "$version" ]; then | |
for v in $version; do | |
echo "$d -> eslint@$v" | |
if [ "$v" = '3.7.2' ]; then |
pragma solidity ^0.4.12; | |
contract helloworld { | |
address private Owner; | |
string public sayHello; | |
function helloworld() { | |
Owner = msg.sender; | |
sayHello = "Hello"; |
0xc2285f89B5b228E9a51f2B80dd0712F0ac071C9e |
// This is a simple NodeJS app to display triggered events on a smart contract | |
// you need your contract ABI and deployed address and also a synced geth running | |
// github.com/shayanb | |
var optionsABI = [YOUR_CONTRACT_ABI] | |
var contractAddress = "0xYOUR_CONTRACT_ADDRESS" | |
var Web3 = require('web3'); |
MOVED TO [GitHub](https://github.com/shayanb/Testnet-blocksize-fork-data-Raw) | |
apparently gist trims the big files. |
from pycoin.tx.pay_to import address_for_pay_to_script, build_hash160_lookup, build_p2sh_lookup, ScriptMultisig | |
from pycoin.key import Key | |
def generate_multisig_address(priv_keys, N=3, M=2, netcode = COIN_NETWORK): | |
''' | |
Generate a multisig address from a list of pycoin keys (addresses public or private) | |
multisig N out of M | |
''' | |
#keys = sorted(keys, key=lambda k: k.sec_as_hex()) #sort keys to have the same multisig address from any similar list of keys | |
keys = [] |
#python script to convert bibtex for SAFBuilder CSV | |
#Make Papers bibtex export available to be used with SAFBuilder to make a Simple Archive Format to be able to import in dSpace (I know! lol) | |
import bibtexparser | |
import csv | |
import urllib2 | |
with open('cryptolibrary.bib') as bibtex_file: | |
bibtex_str = bibtex_file.read() |
<?php | |
/* | |
PHP script to import MYSQL database dump in Heroku cleardb | |
By Shayan Eskandari 2015 | |
export your mysql dump from phpmyadmin or with sqldump commandline -> database_scheme.sql | |
you have to modify the dump and remove the create database and schema details | |
here is one example | |
//database_schema.sql |
- (NSString*)UDID { | |
NSString *uuidString = nil; | |
// get os version | |
NSUInteger currentOSVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] integerValue]; | |
if(currentOSVersion <= 5) { | |
if([[NSUserDefaults standardUserDefaults] valueForKey:@"udid"]) { | |
uuidString = [[NSUserDefaults standardDefaults] valueForKey:@"udid"]; | |
} else { | |
CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); |