Skip to content

Instantly share code, notes, and snippets.

@nekhbet
nekhbet / optimize.sh
Last active August 29, 2015 14:14 — forked from Mad182/optimize.sh
#!/bin/bash
optimize() {
jpegoptim *.jpg --strip-all
optipng *.png
for i in *
do
if test -d $i
then
cd $i
echo $i
@nekhbet
nekhbet / closeConnection.php
Created October 1, 2016 18:45 — forked from bubba-h57/closeConnection.php
Easy way to close connections to the browser and continue processing on the server.
<?php
/**
* Close the connection to the browser but continue processing the operation
* @param $body
*/
public function closeConnection($body, $responseCode){
// Cause we are clever and don't want the rest of the script to be bound by a timeout.
// Set to zero so no time limit is imposed from here on out.
set_time_limit(0);