Skip to content

Instantly share code, notes, and snippets.

// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
from PyQt4 import QtCore, QtGui
class Dialog(QtGui.QDialog):
def __init__(self, parent=None):
super(Dialog, self).__init__(parent)
self.resize(300,200)
def showEvent(self, event):
@0xnbk
0xnbk / phpunit.xml
Created January 28, 2015 08:26
PHPUnit
<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="true">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com
@0xnbk
0xnbk / pusher.html
Last active August 29, 2015 14:07
Custom Pusher implementation with Slanger
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pusher Test</title>
<script src="//js.pusher.com/2.2/pusher.min.js"></script>
</head>
<body>
<b>Real time test - see console</b>
<script>

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@0xnbk
0xnbk / gist:7209445
Last active December 26, 2015 20:29
{
"dbType" : "mongodb",
"dbSettings" : {
"user" : "user",
"host" : "localhost",
"port" : 43348,
"password": "password",
"dbname": "db_name"
}
@0xnbk
0xnbk / gist:7201738
Last active December 26, 2015 19:29
Etherpad lite config
{
"title": "Etherpad",
"favicon": "favicon.ico",
"ip": "0.0.0.0",
"port" : 9001,
"sessionKey" : "",
@0xnbk
0xnbk / file_upload.js
Last active December 19, 2015 05:09
Programmatically upload a file from SD Card to a remote server using Phonegap
uploadFile('test.zip', 'Test', 'multipart/x-zip');
function uploadFile(fileName, dirName, fileMime) {
var win = function(r) {
console.log("Code = " + r.responseCode);
console.log("Response = " + r.response);
console.log("Sent = " + r.bytesSent);
alert(r.response);
};