Skip to content

Instantly share code, notes, and snippets.

View nervouna's full-sized avatar
🚧
Old Dog New Tricks

大毛 nervouna

🚧
Old Dog New Tricks
  • 北京
View GitHub Profile
@nervouna
nervouna / secretkey.py
Last active March 31, 2017 13:38 — forked from geoffalday/secretkey.py
How to generate a secret key with Python
# How to generate a secret key with Python
# via http://flask.pocoo.org/docs/quickstart/
import os
import binascii
os.urandom(24)
# Out: b'\x83[\x14\xa4s\xde\xdd\xed\xed/\xd0&-\xc6N\xd5\xb7\xf8O\xd5(\xce\xca,'
# Or if you want a prettier one:
binascii.hexlify(os.urandom(24))
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//
#!/bin/sh -ex
inhouseserver="http://inhouse.xxx.com/upload"
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
projectpath=$1
scheme=$2
projectname=$(basename "${projectpath}")