This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Active Directory, which is enabled by this, may break Kerberos/kinit/AFS from your mac. Mostly, kinit is used by Active Directory and kinit remembers the last domain you used if you omit the username and password, and your mac will frequently kinit to [email protected], so when you go to kinit without parameters, it will kinit to the windows kerberos server. I think you may be able to just alias kinit to 'kinit [email protected]', provider you have the correct kerberos configuration (I can provide you with one). AFS installation is tricky, but it does in fact work on macs. | |
1a. I've noticed long delays occasionally when logging in/out of my machine, and this seems to be exacerbated when using a Mac remotely over spotty wifi. This is apparently a known issue on Macs. | |
2. A Case-Insensitive file system is the default on a Mac, but if you manually reinstalled your OS with a case-sensitive file system, CrashPlan won't work out of the box. There is a fix for this: | |
http://support.code42.com/CrashP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Active Directory, which is enabled by this, may break Kerberos/kinit/AFS from your mac. Mostly, kinit is used by Active Directory and kinit remembers the last domain you used if you omit the username and password, and your mac will frequently kinit to [email protected], so when you go to kinit without parameters, it will kinit to the windows kerberos server. I think you may be able to just alias kinit to 'kinit [email protected]', provider you have the correct kerberos configuration (I can provide you with one). AFS installation is tricky, but it does in fact work on macs. | |
1a. I've noticed long delays occasionally when logging in/out of my machine, and this seems to be exacerbated when using a Mac remotely over spotty wifi. This is apparently a known issue on Macs. | |
2. A Case-Insensitive file system is the default on a Mac, but if you manually reinstalled your OS with a case-sensitive file system, CrashPlan won't work out of the box. There is a fix for this: | |
http://support.code42.com/CrashP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repolist="$1" | |
while IFS='' read -r repo || [[ -n "$repo" ]]; do | |
local_dir=$(basename "$repo") | |
if [ -e "$local_dir" ]; then | |
echo "Repo exists, updating $local_dir..." | |
git --git-dir $local_dir remote update | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE Event; | |
DROP TABLE Run; | |
-- SQLite actually turns foreign keys off by default | |
PRAGMA foreign_keys = ON; | |
CREATE TABLE Run ( | |
id INTEGER PRIMARY KEY, | |
startTime DATETIME, | |
quality VARCHAR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.srs.vfs; | |
import java.nio.file.InvalidPathException; | |
/** | |
* | |
* @author bvan | |
*/ | |
public class PathUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import bs4 | |
import requests | |
import re | |
import time | |
def get_page(href): | |
print "Getting page:" + href | |
time.sleep(2) | |
if not href: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datacat import client_from_config_file | |
from datacat.model import Folder | |
import os | |
client = client_from_config_file() | |
def is_valid_folder(child): | |
try: | |
if isinstance(child, Folder) and float(child.name): | |
return True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from auth import HMACAuthSRS | |
import requests | |
key_id = "..." # | |
secret_key = "..." # | |
url = "http://somewhere.slac.stanford.edu/SomeApplication" | |
auth = HMACAuthSRS(key_id, secret_key, url) | |
# See http://docs.python-requests.org/en/latest/user/quickstart/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
from toy import toy_blueprint | |
app.register_blueprint(toy_blueprint) | |
if __name__ == '__main__': | |
app.run() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib | |
#import logging | |
#logging.basicConfig(level=logging.DEBUG) | |
#httplib.HTTPConnection.debuglevel = 1 | |
def getData( request ): | |
'''queries the database for the requested information''' | |
servername = "glast-ground.slac.stanford.edu" | |
conn = httplib.HTTPConnection( servername ) | |
conn.putrequest( 'GET', request ) |