Skip to content

Instantly share code, notes, and snippets.

View itsprofcjs's full-sized avatar
🎯
Focusing

Rupesh Kumar Singh itsprofcjs

🎯
Focusing
View GitHub Profile
server {
listen 80;
listen [::]:80;
root /usr/share/nginx/html;
index index.html;
location / {
@danclarke
danclarke / compress.js
Created March 20, 2017 00:44
Compress files in directory and sub directories using gzip and brotli
const brotli = require('brotli');
const zlib = require('zlib');
const fs = require('fs');
const path = require('path');
const compressDir = function (dir) {
console.log('Reading in: ' + dir);
fs.readdir(dir, function (err, files) {
if (err) {
console.error("Could not list the directory.", err);
@terrywbrady
terrywbrady / GoogleSpreadsheet.html
Last active February 28, 2025 09:00
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}