Skip to content

Instantly share code, notes, and snippets.

Manas Tungare manastungare

View GitHub Profile
@manastungare
manastungare / sass.sh
Last active Oct 9, 2017
sass.sh: A fully native file system watcher for SASS (uses libsass, sassc & fswatch)
View sass.sh
#!/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
sudo make me a sandwich
View Makefile
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/"
View stroop.css
* {
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
Laptop Theft Protector
View antitheft.php
<?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.
-------------------------------------------------------------------------------
View twitter-status.php
<?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
On-the-fly CSS Compression
View css-compress.php
<?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.
*
You can’t perform that action at this time.