Skip to content

Instantly share code, notes, and snippets.

View jpatel3's full-sized avatar
🏃
One step at a time

Jaimin jpatel3

🏃
One step at a time
View GitHub Profile
@jpatel3
jpatel3 / JSMatrix
Created August 5, 2012 16:46
JavaScript Multiplication
<html>
<head>
<title>10*10 Multiplication Matrix</title>
</head>
<body>
<table border="2" cellspacing="0" >
<script language="javascript">
//Width
x=10
@jpatel3
jpatel3 / admin.py
Created September 24, 2012 17:27
django admin.py for content managment.
from django.contrib import admin
from units.models import Unit
from references_u.models import ReferenceU
from qna.models import Question, QuestionHints, QuestionAnswer, QuestionAnswerChoice
class ReferenceUInline(admin.StackedInline):
model = ReferenceU
extra = 1
class QuestionHintsInline(admin.StackedInline):
@jpatel3
jpatel3 / pre-commit
Last active December 10, 2015 21:28
pre-commit hook.(inspired by yipit gist)
#!/usr/bin/env python
# encoding: utf-8
"""
pre-commit.py
Created by Jaimin Patel on 2013-01-08.
Copyright (c) 2013 __TuvaLabs__. All rights reserved.
"""
#!/usr/bin/env python
#!/usr/bin/env python
from __future__ import with_statement
import os
import re
import shutil
import subprocess
import sys
import tempfile
//image modifier will make images all the same size
PImage[] tempImages;
String rootDir = "C:/Users/Ben/Dropbox/TuvaLabs UI-UX Design/Mock-ups/Assets/Images for Personalization Page/";
ArrayList directories, names; //holds the directories for all image files to be modified
void setup(){
size(200,150);
directories = new ArrayList();
@jpatel3
jpatel3 / jenkins-build.sh
Created March 8, 2013 15:15
jenkins build script for django-jenkins
#!/bin/bash -ex
cd $WORKSPACE
virtualenv -q ve
source ./ve/bin/activate
pip install -E ./ve -r requirements.txt
pip install -E ./ve -r requirements-testing.txt
cd $WORKSPACE/projectname
ln -fs `pwd`/conf/testsettings.py `pwd`/localsettings.py
python manage.py migrate
python manage.py jenkins
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpatel3
jpatel3 / custom_metadata
Last active August 29, 2015 14:21
Sample metadata file to review the additions/changes
{
"fields": [
{"type": "", "name": "Case", "id": "id"},
{"type": "", "name": "Name", "id": "name"},
{"type": "", "name": "Span", "id": "span"},
{"type": "categorical", "sortOrder": "DSC", "name": "Month", "id": "month"},
{"type": "", "name": "Gender", "id": "gender"}]
}
@jpatel3
jpatel3 / dataset-filter.json
Last active May 26, 2016 17:06
Tuva datasets filter menu config
[{
"filter_name": "Subject",
"filter_title": "Subject / Topic",
"children": [{
"name": "",
"tags": [{
"name": "Community",
"description": ""
}, {
"name": "Politics",
@jpatel3
jpatel3 / newrelic-plugin-agent.cfg
Created December 14, 2016 22:15
New Relic plugin agent sample configuration file
%YAML 1.2
---
Application:
license_key: REPLACE_WITH_REAL_KEY
wake_interval: 60
#newrelic_api_timeout: 10
#proxy: http://localhost:8080
#apache_httpd:
# name: hostname