I hereby claim:
- I am mnazim on github.
- I am mnazim (https://keybase.io/mnazim) on keybase.
- I have a public key whose fingerprint is 8B03 3276 1EC5 CC3F D331 E169 A5F8 963F ABD5 0D0A
To claim this, I am signing this object:
import 'dart:convert'; | |
void main() { | |
String someJson = """{ | |
"iceCreams": [ | |
{ | |
"flavor": "raspberry", | |
"color": "red" | |
}, | |
{ |
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
import { Schema, arrayOf, normalize } from 'normalizr'; | |
import { camelizeKeys } from 'humps'; | |
import axios from 'axios'; | |
const API_ROOT = 'http://localhost:5555/api/v1/'; | |
// Fetches an API response. | |
// This makes every API response have the same shape, regardless of how nested it was. | |
function callApi(endpoint, method = 'get', data = {}, schema = null) { | |
const fullUrl = (endpoint.indexOf(API_ROOT) === -1) ? API_ROOT + endpoint : endpoint; |
(function () { | |
var Modular = function () { | |
this.VERSION = '0.0.1', | |
this.modules = {}, | |
this.activeModules = [], | |
this.currentPath = undefined, | |
this.registeredPaths = undefined, | |
this.host = undefined, | |
this.protocol = undefined; | |
}; |
var _ = require('underscore'), | |
exec = require('child_process').exec, | |
net = require('net'), | |
email = process.argv.splice(2)[0], | |
domain = email.split('@')[1]; | |
function verify(mxrecord) { | |
console.log('connecting to', mxrecord); | |
var conn = net.createConnection(25, mxrecord), | |
commands = [ |
function get_ordinal($num) { | |
$temp_num = ($num > 31) ? ($num % 31) + 1 : $num; | |
return $num . date('S', mktime(0, 0, 0, $temp_num, 0, 0)); | |
} |
from django import forms | |
list_of_choices = ( | |
(1, 'Choice 1'), | |
(2, 'Choice 2'), | |
(3, 'Choice 3'), | |
# ... | |
(n, 'Choice n'), | |
) | |
class MyForm(forms.Form): | |
my_choice_field = forms.ChoiceField(choices=list_of_choices) |
$ mkvirtualenv test | |
New python executable in ./bin/python | |
Installing distribute....................................................................................................................................done. | |
Complete output from command /home/mir/test/bin/python /home/mir/test/bin/easy_install /usr/share/python-virtualenv/p...ar.gz: | |
/home/mir/test/bin/python: can't open file '/home/mir/test/bin/easy_install': [Errno 2] No such file or directory | |
---------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/bin/virtualenv", line 3, in | |
virtualenv.main() | |
File "/usr/lib/pymodules/python2.6/virtualenv.py", line 534, in main |