Skip to content

Instantly share code, notes, and snippets.

@ksmyth
ksmyth / boxstarter
Last active November 18, 2015 17:57
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$true
# choco config set cacheLocation \\longbox\share\chocolately_cache
$disk = Get-WmiObject Win32_LogicalDisk -Filter "DeviceID='C:'" | Select-Object Size,FreeSpace
if ($disk.FreeSpace -lt (5 * 1024 * 1024 * 1024)) {
Out-File -Encoding utf8 -FilePath extend.diskpart -InputObject "sel vol c: `nextend size=5000 `n"
diskpart /s extend.diskpart
}
"""Component has a pass_by_obj=True parameter connected to the driver"""
from __future__ import print_function
from openmdao.api import IndepVarComp, Component, Problem, Group, Driver
import numpy
import itertools
import six
from openmdao.util.record_util import create_local_meta, update_local_meta
@ksmyth
ksmyth / gist:39c4ae8bd7c995534409
Created May 19, 2015 21:57
snowcrash_crash_vc100
Opened log file 'c:\users\kevin\snowcrash_crash_vc100'
0:002> r
rax=000000000a935ff0 rbx=000000000a685f90 rcx=000000000a935ff0
rdx=000000000b053fd8 rsi=0000000002d95e20 rdi=00007ff74e7cca90
rip=00007ff86c3c55a8 rsp=000000000c4dd690 rbp=0000000000000000
r8=0000000000000004 r9=ffffffffffffffff r10=0000000000000000
r11=00000000064a7ed0 r12=00007ff87b0e0000 r13=00007ff87b0f09e4
r14=0000000000000000 r15=00007ff74dd69000
iopl=0 nv up ei ng nz na pe cy
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010283
FORMAT: 1A
# WebGME API
WebGME API provides access to various resources such as _users_, _organizations_, and _projects_.
All paths are relative to version 1 api `/api/v1` or the latest api `/api`.
Throughout this document we will use `http://localhost:8888/` as the base url. E.g. the api root is `http://localhost:8888/api`.
## Authentication
C:\Users\kevin\Documents\protagonist>node --version
v0.10.37
C:\Users\kevin\Documents\protagonist>node-gyp -v
v1.0.3
C:\Users\kevin\Documents\protagonist>git rev-parse HEAD
60f2fbe9b8983ff23f0ccc2950366212a534b4a3
C:\Users\kevin\Documents\protagonist>node-gyp build
@ksmyth
ksmyth / gist:e119642ce02d15575f37
Created March 31, 2015 17:27
webgme copyproject
/* global define,require,console */
/*
config.json: "rextrast": { "copyproject": "./src/rest/copyproject/CopyProject", ...
http://localhost:8855/rest/external/copyproject
*/
define(['common/LogManager'
], function (logManager) {
'use strict';
var path = require('path'),
@ksmyth
ksmyth / gist:606d952587a2c4842e4e
Last active August 29, 2015 14:16
Node.js flamegraphs on Ubuntu
sudo apt-get install -y build-essential git-core linux-tools-common linux-base
git clone https://github.com/joyent/node.git
cd node
git checkout origin/v0.11.14-release
./configure && make && sudo make install
node --perf-basic-prof app.js
sudo sysctl kernel/kptr_restrict=0
sudo bash