Skip to content

Instantly share code, notes, and snippets.

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

Hardik Pandya hardikpandya

🏠
Working from home
View GitHub Profile
<form method="get" id="search" action="http://duckduckgo.com/">
<input type="hidden" name="sites"value="hardikpandya.com"/>
<input type="hidden" name="ka" value="h"/>
<input type="hidden" name="k7" value="#fafafa"/>
<input type="hidden" name="kj" value="#3f3f3f"/>
<input type="hidden" name="ky" value="#fafafa"/>
<input type="hidden" name="kx" value="b"/>
<input type="hidden" name="kt" value="Helvetica"/>
<input type="text" name="q" maxlength="255" placeholder="Search"/>
<input type="submit" value="DuckDuckGo Search" style="visibility: hidden;" />
@hardikpandya
hardikpandya / style.css
Last active December 17, 2015 23:49
The style sheet to stylise your DuckDuckGo search box
.search
{
padding-bottom: 0px;
}
.search li
{
list-style: none;
margin: 0 0 0em 0;
padding-left: 1em;
@hardikpandya
hardikpandya / 9292.py
Last active December 20, 2015 14:58
A Pythonista script to load 9292.nl results with 1 click for predefined start and end journey destinations.
import datetime #date and time fetching
import urllib
import webbrowser #for opening links in the in-app browser
now= datetime.datetime.now()
print datetime.time(now.hour, now.minute)
# creating shorthands for larger variable names
nh = now.hour
nm = now.minute
nd = now.day
nmonth = now.month
Verifying that +hardik is my openname (Bitcoin username). https://onename.io/hardik
@hardikpandya
hardikpandya / index.html
Created January 2, 2015 10:37
Interactive Download Button in jQuery // source http://jsbin.com/xowiha
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>Interactive Download Button in jQuery</title>
<style id="jsbin-css">
.download-button {
font-size: 85%;
background-color: #4786f1;
@hardikpandya
hardikpandya / index.html
Created January 2, 2015 10:37
Interactive Download Button in jQuery // source http://jsbin.com/xowiha
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>Interactive Download Button in jQuery</title>
<style id="jsbin-css">
.download-button {
font-size: 85%;
background-color: #4786f1;
@hardikpandya
hardikpandya / downloadButton.js
Last active August 29, 2015 14:12
Interactive Download Button using jQuery
var $button = $("a.download-button"); //finding the matching buttons on the DOM
$button.on('click', function(){ // adding click event handler to the buttons
var $clickedButton = $(this); // storing the current button for reference
var $href = $(this).attr("href");
$clickedButton.text("Downloading...");
$clickedButton.css("background-color", "#275AB0");
setTimeout(function(){
@hardikpandya
hardikpandya / Gulp.js
Created January 6, 2015 13:31
Gulp.js
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var notify = require('gulp-notify');
gulp.task('css-js', function() {