This file contains 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
URxvt.termName: rxvt-256color | |
URxvt.reverseVideo: True | |
URxvt.font: xft:inconsolata:pixelsize=18 | |
! Low contrast theme, based on Zenburn <http://slinky.imukuppi.org/zenburnpage/> | |
! ! Modified from <https://gist.github.com/564084> | |
URxvt.foreground: #0c0c0c | |
URxvt.color0: #3f3f3f | |
URxvt.color1: #705050 | |
URxvt.color2: #00b45a |
This file contains 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
var http = require('http'); | |
var server = http.createServer(function(req, res) { | |
// console.log(req); // debug dump the request | |
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object) | |
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64 | |
console.log("Authorization Header is: ", auth); |
This file contains 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
<body><script> | |
var B = 'B', Y = 'Y', R = 'R'; | |
var init_state = [[B], [R], [R], [Y], [Y], [Y], [R], [R], [B]]; | |
function equalCol(c0, c1) { | |
if (c0.length === c1.length) { | |
for (var i = 0; i < c0.length; ++i) { |
This file contains 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
/* | |
Original highlight.js style (c) Ivan Sagalaev <[email protected]> | |
*/ | |
.hljs { | |
display: block; | |
overflow-x: auto; | |
padding: 0.5em; |
This file contains 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
_b = sys.version_info[0] < 3 and (lambda x:x) or (lambda x:x.encode('utf-8')) | |
def ssh_exec_pass(password, args, capture_output=False): | |
''' | |
Wrapper around openssh that allows you to send a password to |
This file contains 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
The problem: When clicking, how should the select dropdown be closed? | |
The angular-material solution: | |
Use a backdrop | |
https://github.com/angular/material/blob/c13feb76bd05d026a71fc8e7c4a556a1ebd56831/src/components/backdrop/backdrop.scss |
This file contains 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
0 info it worked if it ends with ok | |
1 verbose cli [ '/opt/software/node-v4.4.5-linux-x64/bin/node', | |
1 verbose cli '/opt/software/node-v4.4.5-linux-x64/bin/npm', | |
1 verbose cli 'install' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose readDependencies loading dependencies from /home/zjk/dev/github/vscode/package.json | |
5 verbose readDependencies npm-shrinkwrap.json is overriding dependencies | |
6 info shrinkwrap file "/home/zjk/dev/github/vscode/npm-shrinkwrap.json" | |
7 verbose readDependencies returned deps { 'agent-base': 'https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz', |
This file contains 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 SimpleHTTPServer | |
class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def translate_path(self, path): | |
if path == '/lightwallet' or path == '/lightwallet/login' or path[:19] == '/lightwallet/wallet': | |
path = '/lightwallet/index.html' | |
p0 = SimpleHTTPServer.SimpleHTTPRequestHandler.translate_path(self, path) | |
return p0 |
This file contains 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
//////////////////////////////////////////////////////////////////////////////// | |
// Lab 6 | |
//////////////////////////////////////////////////////////////////////////////// | |
// Include the checkoff program: | |
.include "checkoff.uasm" | |
// Leave the following as zero to run ALL the test cases, and get your solution | |
// validated if all pass. If you have trouble with test case N, set it to N | |
// to run JUST that test case (for easier debugging): |
This file contains 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
#!/usr/bin/python | |
import logging | |
import socket | |
from threading import Thread | |
class PipeThread(Thread): | |
pipes = [] |
NewerOlder