Skip to content

Instantly share code, notes, and snippets.

View nitinja's full-sized avatar

Nitin Jadhav nitinja

View GitHub Profile
@nitinja
nitinja / people.json
Last active May 26, 2022 11:32
TMP json people feed
{
"rows": [
{
"id": "2314b8116c35215dd22878c093dbe621f2a4c8d84174d28930a8ea915e96d71e",
"cpid": "JD-60026929",
"full_name": "John Doe two",
"known_as": "John doe two",
"orcid": "1234-0002-5783-6666",
"email": "johndoe2@ebi.ac.uk",
"outstation": "EMBL-EBI",
@nitinja
nitinja / gist:1683b252104f4a3116135bb7c480252e
Created December 2, 2019 06:05 — forked from janmisek/gist:63bd49106e27eea771f4
Search for value in object - including handled recursion
var walked = [];
var searchHaystack = function(haystack, needle, path, exactEquals) {
//dumb truthiness handling
exactEquals = exactEquals ? true : false;
if(typeof haystack != "object") {
console.warn("non-object haystack at " + path.join("."));
return [false, null];
@nitinja
nitinja / stylish-checkboxes-radios.html
Created May 25, 2017 03:01
CSS only styles for checkboxes and radios
<!DOCTYPE html>
<html lang="en" >
<head >
<meta charset="UTF-8" >
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" >
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" >
<style >
@nitinja
nitinja / deploy.sh
Created February 19, 2017 17:39
script to bundle & deploy Javascript apps to remote server using npm
#!/bin/bash
#Get app version
APP_VERSION=$(node -pe "require('./package.json').version")
#create a name for your bundle
ARCHIVE_NAME='app-name-'$APP_VERSION'.tar.gz'
#create an archive
tar -czvf $ARCHIVE_NAME -C ./dist .
@nitinja
nitinja / Package.json & Basic Config files for jshint + Other tools
Last active December 6, 2015 14:41
Package.json & Basic Config files for jshint + Other tools. Will be improved over time.
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
/**
* Minimum set up for a revealing module pattern jQuery plugin
*
* This is a bare plugin that uses the revealing module pattern to attach
* public and private vars and methods to a jQuery selector.
*
* Example:
*
* $('#menu').collapsible().init();
* $('#menu').collapsible().open();