Skip to content

Instantly share code, notes, and snippets.

@csbuja
csbuja / gist:c521684567429f1e96a6
Last active August 29, 2015 14:05
Some thing
var express = require('express');
var request = require('request');
var app = express();
var APICALLNAME = 'set this here ... maybe other names I have no idea, nick'
app.get('/'+APICALLNAME, function(req, res) {
request.get({
url: 'twitter apicall url', json:true}, function(error, response, body){
res.json(response); // assuming you're getting json not other stuff like xml or something
});
});
@csbuja
csbuja / gist:e73591ad3eff6f5a11d8
Created June 6, 2014 17:06
oldmanage.py for graphite
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
sys.exit(1)
if __name__ == "__main__":
@csbuja
csbuja / test gist
Created April 27, 2014 14:35
test gist
#include <iostream>
using namespace std;
int main()
{
cout << "test" << endl;