Skip to content

Instantly share code, notes, and snippets.

View freewayz's full-sized avatar
🏠
Working from home

Peter Edache freewayz

🏠
Working from home
View GitHub Profile
// number to string, pluginized from http://stackoverflow.com/questions/5529934/javascript-numbers-to-words
window.num2str = function (num) {
return window.num2str.convert(num);
}
window.num2str.ones=['','one','two','three','four','five','six','seven','eight','nine'];
window.num2str.tens=['','','twenty','thirty','forty','fifty','sixty','seventy','eighty','ninety'];
window.num2str.teens=['ten','eleven','twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'];
@freewayz
freewayz / admin.py
Created November 12, 2017 06:43 — forked from mattlong/admin.py
Add a custom admin page for a model and link to it from the detail page
from functools import update_wrapper
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.core.exceptions import PermissionDenied
from django.shortcuts import render
from myapp.models import Widget
from myapp.forms import ManageWidgetForm
@freewayz
freewayz / GWT Compiler Options
Created April 8, 2017 01:32 — forked from abdennebi/GWT Compiler Options
GWT Compiler Options
Source : https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging
java -cp gwt-dev.jar com.google.gwt.dev.Compiler
Missing required argument 'module[s]'
Google Web Toolkit 2.3.0
Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-optimize level] [-compileReport] [-strict] [-localWorkers count] [-war dir] [-deploy dir] [-extra dir] module[s]
where
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
@freewayz
freewayz / frontendDevlopmentBookmarks.md
Created October 7, 2016 04:45 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.