Recent Pads - Page 29

Total pad count: 598
created 5 years, 159 days ago
pyramid-inject-renderer-globals-title-and-analytics

def inject_renderer_globals( event ):
    """Inject some renderer globals before passing to template"""

    request = event['request']

    # Build ${title} from the current request.path  
    event['title'] =  ' - '.join( request.path.replace( '-', ' ' ).split( '/' )[1:] ).title()
... view all 11 lines

created 5 years, 159 days ago
65cc6c6f-10ab-44dd-b5e0-ef024b7364ff

what pad is this 
looks fast
... view all 3 lines

created 5 years, 162 days ago
a213fc26-5b26-45b6-a861-4fe755a72835

Delivered-To: northwindmanagement@gmail.com
Received: by 10.50.104.197 with SMTP id gg5csp61720igb;
        Wed, 12 Sep 2012 00:06:42 -0700 (PDT)
Received: by 10.182.193.7 with SMTP id hk7mr20884301obc.30.1347433600985;
        Wed, 12 Sep 2012 00:06:40 -0700 (PDT)
Return-Path: <Nick.Raymonde@sonymusic.com>
Received: from va3outboundpool.messaging.microsoft.com (va3ehsobe002.messaging.microsoft.com. [216.32.180.12])
... view all 66 lines

created 5 years, 166 days ago
e9f48aa9-27b7-4b60-bbca-4e8dde419ec2

Plan: good, Percentage: 66
Plan: better, Percentage: 0
Plan: best, Percentage: 8
Plan: super, Percentage: 16
... view all 5 lines

created 5 years, 167 days ago
yqbgsdqajfryrs

service zenoss start
Zenoss not initialized.  Performing first-boot initialization...
Fresh install pre steps
Checking RRDtool version >= 1.4.7: [ OK ] 1.4.7
Adding RabbitMQ user:
Error: {user_already_exists,<<>>}
Adding RabbitMQ vhost:
... view all 13 lines

created 5 years, 171 days ago
dcbf5ace-9989-4a4f-98ed-5fe173dc450b

22/tcp   open     ssh
80/tcp   open     http
389/tcp  filtered ldap
443/tcp  open     https
514/tcp  filtered shell
646/tcp  filtered ldp
1718/tcp filtered unknown
... view all 14 lines

created 5 years, 171 days ago
8291a4b5-193b-4b8b-be93-f5f74eaa3b2a

Not shown: 991 closed ports
PORT     STATE    SERVICE
22/tcp   open     ssh
80/tcp   open     http
135/tcp  filtered msrpc
139/tcp  filtered netbios-ssn
443/tcp  open     https
... view all 11 lines

created 5 years, 179 days ago
2d09df13-c11f-4da7-8330-0f83efae45b8

what
who
now?
... view all 3 lines

created 5 years, 187 days ago
fcb818ee-19be-46d3-a9d4-221c3a109d86

from random import shuffle, randrange
from collections import defaultdict

print "init..."

max = 10000001

... view all 20 lines

created 5 years, 190 days ago
python-twitter-friend-vs-follower

from time import sleep
import json
import requests
# easy_install requests or pip install requests

APIURI = "https://api.twitter.com/1"

... view all 82 lines

created 5 years, 190 days ago
build-cve-report-from-redhat

import sys
from subprocess import call
from BeautifulSoup import BeautifulSoup
from os import remove

def print_report( cvelist ):

... view all 69 lines

created 5 years, 190 days ago
generate-random-passwords-in-python

def generate_password( size = 9 ):
    """Return a system generated password"""
    from string import letters, digits
    from random import choice
    pool = letters + digits
    return ''.join( [ choice( pool ) for i in range( size ) ] )
... view all 6 lines

created 5 years, 190 days ago
build-amanda-disk-list

# make_disklist.py # amanda disklist
from datetime import datetime, date, timedelta

def prev_month_bounds( when=None ):
    """Return previous month's ( first date, last date )"""
    if not when: when = datetime.now()

... view all 21 lines

created 5 years, 197 days ago
python-set-a-filepath

from os import path

filepath = filename
if save_dir: 
    filepath = os.path.join(save_dir, filepath) 

"""
... view all 15 lines

created 5 years, 197 days ago
python-test-for-trailing-slash-in-path

    if not save_dir:
        filepath = filename
    elif save_dir.endswith('/'):
        filepath = save_dir + filename
    else:
        filepath = save_dir + '/' + filename
... view all 6 lines

created 5 years, 198 days ago
60e4dc39-1cf2-459b-a3fd-0135f49527c1

peca
teca checa
... view all 3 lines

created 5 years, 198 days ago
tedicopuba

import sqlite3
c = sqlite3.connect(':memory:')
c.row_factory = sqlite3.Row
for row in c.execute('select 1 as foo, 2 as bar'):
    print dict(row)
... view all 5 lines

created 5 years, 200 days ago
python-bingo

from random import choice

if __name__ == '__main__':

    pool = {}
    history = {}

... view all 34 lines

created 5 years, 200 days ago
java-bingo

import java.util.HashMap;
import java.util.Random;
import java.util.Set;

// needed for user input
import java.util.Scanner;

... view all 91 lines

created 5 years, 200 days ago
8b2a9a47-cb65-4a14-bd2e-b2c0a8bcd14d

import java.security.MessageDigest;
import java.math.BigInteger;

// signup for an APIKEY here: https://linkpeek.com/signup

class Api_v1 {
    /***LinkPeek.com API v1 helper class***/
... view all 40 lines

pages 1 .. 27 28 29 30