Skip to content

Instantly share code, notes, and snippets.

View logicaroma's full-sized avatar

Ramin Mohammadi logicaroma

View GitHub Profile
@paulirish
paulirish / data-markdown.user.js
Last active September 12, 2025 10:57
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@attaboy
attaboy / gist:1346280
Created November 7, 2011 21:40
Destroy the localStorage copy of less.js client-side-generated CSS
// Destroys the localStorage copy of CSS that less.js creates
function destroyLessCache(pathToCss) { // e.g. '/css/' or '/stylesheets/'
if (!window.localStorage || !less || less.env !== 'development') {
return;
}
var host = window.location.host;
var protocol = window.location.protocol;
var keyPrefix = protocol + '//' + host + pathToCss;
@freespace
freespace / gist:2585921
Created May 3, 2012 14:14
Backup of some arduino code to handle OV7670
#define SIO_C 2
#define SIO_D 4
#define SIO_CLOCK_DELAY 100
void setup()
{
pinMode(8,OUTPUT);
// while(1)
// {
@guailv
guailv / dabblet.css
Created May 27, 2012 01:13
Buttonsbuttonsbuttons
/* Buttonsbuttonsbuttons */
/* Designed by Anthony Lagoon - http://drbl.in/efCN */
html {
background-image: linear-gradient(#edeeef, #fff);
min-height: 100%;
}
body {
font: 100%/1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
@ptz0n
ptz0n / _respond.scss
Created July 22, 2012 10:11
Sass respond to mixin
@mixin respond-to($media) {
@if $media == landscape {
@media screen and (min-width: 321px) { @content; }
}
@else if $media == tablet {
@media only screen and (min-width: 768px) { @content; }
}
@else if $media == desktop {
@media only screen and (min-width: 992px) { @content; }
}
@twolfson
twolfson / grunt.js
Last active January 5, 2016 21:07
Download and unzip Twitter Bootstrap in one fell swoop with grunt
module.exports = function (grunt) {
// Initial configuration
grunt.initConfig({
// Download external resources
curl: {
// Twitter Bootstrap
bootstrap: {
src: 'http://twitter.github.com/bootstrap/assets/bootstrap.zip',
dest: 'tmp/bootstrap.zip'
}
anonymous
anonymous / db.py
Created March 22, 2013 18:04
Mainly working curses based menu for kali linux if you are using a tiled window manager like i3wm.
# coding=utf-8
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
'use strict';
var moment = require('moment');
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};