Skip to content

Instantly share code, notes, and snippets.

@dpanda
dpanda / gist:5830306
Created June 21, 2013 10:21
Bash script I wrote to find out unused images in a sass project (assuming that all images are in the "img" directory and sass files in the "sass" directory).
#!/bin/bash
cd img
images=(`ls *.png *.jpg *.jpeg *.gif 2> /dev/null`) # get all images
cd ../sass
scss=(`ls *.scss */*.scss`) # get all compass files
usedImg=()
unusedImg=()
@dpanda
dpanda / decompress_lzf_file.py
Created November 18, 2016 21:49
Using python-lzf module, decompress a whole LZF file
import argparse
import lzf
import os
import struct
def decompress(lzf_file, out_file):
chunk_number=1
while True: