Skip to content

Instantly share code, notes, and snippets.

@ajaswa
ajaswa / gist:8367828
Created January 11, 2014 06:38
bfgminer.rb
require 'formula'
class Bfgminer < Formula
homepage 'https://github.com/luke-jr/bfgminer'
head 'https://github.com/nwoolls/bfgminer.git', :branch => 'feature/antminer-u1-support'
url 'http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.9.0/bfgminer-3.9.0.zip'
sha1 '5be8c54b814d1d7f7740f250d9db413ad77fbd91'
depends_on 'autoconf' => :build
depends_on 'automake' => :build
@ajaswa
ajaswa / csscount.sh
Last active December 20, 2015 18:29 — forked from jdp/csscount.sh
#!/bin/sh
cnt=0
depth=0
while read -n 1 char; do
case $char in
"{")
((depth++))
;;
"}")
((depth--))
@ajaswa
ajaswa / index.html
Last active December 17, 2015 08:18
Sweet sliding search in css
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="search-bar.css">
</head>
<body>
<form id='search'>
@ajaswa
ajaswa / index.html
Last active December 12, 2015 04:49
The (incomplete) solar system in html?
<font size="109">&#149;</font>
<p>Sun<p>
<font size=".38">&#149;</font>
<p>Mercury<p>
<font size=".95">&#149;</font>
<p>Venus<p>
<font size="1">&#149;</font>
<p>Earth<p>
<font size=".53">&#149;</font>
<p>Mars<p>
@ajaswa
ajaswa / index.html
Last active December 10, 2015 15:49
<div class="wrapper">
<div class="vertically-centered">
Small or large amount of content.
</div>
</div>
<style>
.wrapper {
/* make this as tall as you want */
height: 500px;
@ajaswa
ajaswa / centered.css
Last active October 12, 2015 01:07
vertical align content
body {
width: 100%;
height: 500px;
margin: 0;
padding: 0;
text-align: center;
}
body:before {
display: inline-block;
content: ' ';
@ajaswa
ajaswa / fancy-radio-buttons.css
Last active October 9, 2015 01:48
Fancy radio buttons
.radios .radio label {
background-color: #fff;
color: #666;
display: inline-block;
border: 1px solid black;
margin: 4px;
padding: 4px;
}
.radios .radio input[type='radio'] {
display: none;
@ajaswa
ajaswa / index.html
Created May 31, 2012 01:24
Util.contains
<!doctype html>
<html>
<head>
<script src="util.js"></script>
<style>
div {
border: 3px solid blue;
height: 100px;
width: 100px;
<script>
(function ($) {
$(function () {
$("#converter").submit(function(){return false;});
$("#rgba").bind('keyup change', function () {
var value = $(this).val();
setArgb(value);
});
$("#argb").bind('keyup change', function () {
var value = $(this).val();
<div style="overflow:auto; height: 50px; width: 200px;">
lots of text
lots of text
lots of text
lots of text
lots of text
lots of text
lots of text
lots of text
lots of text