Skip to content

Instantly share code, notes, and snippets.

@visnup
visnup / sudoku.js
Last active August 29, 2015 14:17
sudoku solver
var _ = require('lodash');
var hard = [ '6 2 3 ',
' 2 7 8',
' 9 4 ',
' 6 3 ',
'8 1',
' 7 4 ',
' 6 9 ',
'4 3 2 ',
@visnup
visnup / curl.txt
Created January 11, 2015 21:59
first example I've seen of ipv6 working in the real world: google ads being smarter than my blocking hosts file
$ curl -v http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js 2>&1 | less
* Hostname was NOT found in DNS cache
* connect to 127.0.0.1 port 80 failed: Connection refused
* Trying 2607:f8b0:4010:801::100d...
* Connected to pagead2.googlesyndication.com (2607:f8b0:4010:801::100d) port 80 (#0)
> GET /pagead/js/adsbygoogle.js HTTP/1.1
> User-Agent: curl/7.37.1
> Host: pagead2.googlesyndication.com
> Accept: */*
@visnup
visnup / index.html
Created December 19, 2014 22:05
simple test case for closed issue in fastclick https://github.com/ftlabs/fastclick/issues/23, but not fixed in angular-touch
<html ng-app='test'>
<head>
<title>touch test</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<style>
button {
width: 100%;
-webkit-tap-highlight-color: transparent;
}
</style>
@visnup
visnup / dabblet.html
Last active August 29, 2015 14:07
Untitled
<input type="number" pattern="\d+" />
@visnup
visnup / dabblet.html
Created August 1, 2014 02:31
Untitled
<input type="text" name="fname" placeholder="First name" />
<input type="text" name="lname" placeholder="Last name" />
<input type="text" name="email" placeholder="Email" />
@visnup
visnup / dabblet.html
Created July 31, 2014 22:47
Untitled
<input type="text" pattern="\d*" />
@visnup
visnup / dabblet.css
Created July 29, 2014 06:08
Untitled
div.image {
background: transparent center center no-repeat;
background-size: auto 100%;
width: 200px;
height: 200px;
}
@visnup
visnup / dabblet.css
Created July 29, 2014 06:08
Untitled
div {
background: url(http://2.bp.blogspot.com/-LzjJphrxhVQ/Tc-hZ0Dp6sI/AAAAAAAADbE/rYNM9tEJWg8/s1600/70-the-most-awesome-picture-ever-taken.jpg) center center no-repeat;
width: 200px;
height: 200px;
}
@visnup
visnup / dabblet.css
Created July 22, 2014 09:28
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@visnup
visnup / dabblet.css
Created June 30, 2014 05:40
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
p { margin: 0; }
ul { list-style-type: none; padding-left: 0; margin: .5em 0 }
li { display: inline-block; }
input { margin-left: 1.5em; }
li:first-child input { margin-left: 0 }
body { font-family: 'Avenir'; }