Skip to content

Instantly share code, notes, and snippets.

View manastungare's full-sized avatar

Manas Tungare manastungare

View GitHub Profile
@manastungare
manastungare / sass.sh
Last active October 9, 2017 00:29
sass.sh: A fully native file system watcher for SASS (uses libsass, sassc & fswatch)
#!/bin/bash
# --------------------------------------------------------------------------------------------------
# Watches a directory for changes to SCSS (SASS) files, and compiles them to CSS.
#
# The original SASS implementation is Ruby-based, which requires Ruby to be installed, which can
# often be a pain. Many other solutions using `gulp` or other build systems require many more
# dependencies, such as Node and `npm`.
#
# I wanted a fully-native pipeline, both, for performance and ease of deployment.
#
@manastungare
manastungare / Makefile
Created May 7, 2012 16:18
sudo make me a sandwich
me:
@if (( `id -u` != 0 )); then { echo "What? Make it yourself."; }; else { echo "Okay."; } fi
a:
@true
sandwich:
@echo "Hat-tip to http://xkcd.com/149/"
* {
font-family: Helvetica, sans-serif;
box-sizing: border-box;
}
body {
height: 100%;
background-color: black;
color: white;
}
@manastungare
manastungare / antitheft.php
Created May 7, 2012 01:52
Laptop Theft Protector
<?php
/*
-------------------------------------------------------------------------------
Laptop Theft Protector
Version 1.0
Copyright (c) 2006, Manas Tungare
http://manas.tungare.name/
-------------------------------------------------------------------------------
READ THIS CAFEFULLY: YOU MUST CUSTOMIZE ONE VARIABLE BEFORE USE.
-------------------------------------------------------------------------------
<?php
// Example: Get a single tweet.
$status = getTwitterStatus("manas");
echo($status[0]['message'] . ' - ' . $status[0]['time']);
// Example: Get multiple tweets.
$statuses = getTwitterStatus("manas", 100);
foreach ($statuses as $status) {
echo($status['message'] . ' - ' . $status['time']);
}
@manastungare
manastungare / css-compress.php
Created May 7, 2012 00:23
On-the-fly CSS Compression
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*