TODO: Write a project description
TODO: Describe the installation process
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "ubuntu/trusty64" |
| #!/bin/sh | |
| #set -x | |
| # Usage: shibb-cas-get.sh {username} {password} # If you have any errors try removing the redirects to get more information | |
| # The service to be called, and a url-encoded version (the url encoding isn't perfect, if you're encoding complex stuff you may wish to replace with a different method) | |
| DEST=https://myapp.example.com/ | |
| SP=https://myapp.example.com/index.php | |
| IDP="https://myidp.example.com/idp/shibboleth&btn_sso=SSOok" |
| """ | |
| Compile with gcc flag -mpopcnt | |
| """ | |
| import numpy as np | |
| cimport numpy as np | |
| cimport cython | |
| from libc.stdint cimport uint32_t, uint8_t | |
| cdef extern int __builtin_popcount(unsigned int) nogil |
| import sys | |
| from pygments.style import Style | |
| #from pygments.token import Keyword, Name, Comment, String, Error, Number, Operator, Generic, Token, Whitespace | |
| class BpcTracebackStyle(Style): | |
| default_style = "" #put something here? | |
| styles = { | |
| Comment: 'bold #888', | |
| Keyword: 'bold #005', | |
| Name: '#f00', |
| # smtplib module send mail | |
| import smtplib | |
| TO = '[email protected]' | |
| SUBJECT = 'TEST MAIL' | |
| TEXT = 'Here is a message from python.' | |
| # Gmail Sign In | |
| gmail_sender = '[email protected]' |
| #!/bin/sh | |
| if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi | |
| exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit | |
| -- another way of waiting until an app is running | |
| on waitUntilRunning(appname, delaytime) | |
| repeat until my appIsRunning(appname) | |
| tell application "Messages" to close window 1 | |
| delay delaytime | |
| end repeat |
| #Set up data partition | |
| sudo mkdir /data | |
| sudo chmod 777 /data | |
| sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab" | |
| sudo mount /data | |
| #Install build environment | |
| sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo | |
| sudo yum -y update | |
| sudo yum -y upgrade |
| [MASTER] | |
| # Specify a configuration file. | |
| #rcfile= | |
| # Python code to execute, usually for sys.path manipulation such as | |
| # pygtk.require(). | |
| #init-hook= | |
| # Profiled execution. |
| # ---- @sexpr: S-expression to AST conversion ---- | |
| is_expr(ex, head::Symbol) = (isa(ex, Expr) && (ex.head == head)) | |
| is_expr(ex, head::Symbol, n::Int) = is_expr(ex, head) && length(ex.args) == n | |
| macro sexpr(ex) | |
| esc(sexpr_to_expr(ex)) | |
| end | |
| sexpr_to_expr(ex) = expr(:quote, ex) |