Skip to content

Instantly share code, notes, and snippets.

@sayar
sayar / enable_mod_deflate.conf
Created Oct 8, 2012
Enable mod_deflate on Apache for Elastic Beanstalk
View enable_mod_deflate.conf
# mod_deflate configuration
<IfModule mod_deflate.c>
# Restrict compression to these MIME types
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xml+rss
AddOutputFilterByType DEFLATE application/x-javascript
@sayar
sayar / yammer-group-download-all-images.js
Last active Nov 28, 2016 — forked from Saturate/yammer-group-download-all-files.js
Download all files in a Yammer.com group. You have to enable popups. Only tested in chrome.
View yammer-group-download-all-images.js
/*
# How to use:
1. Navigate to the files tab (https://www.yammer.com/COMPANY/groups/GROUP/uploaded_files)
2. Press F12.
3. Paste script in console and run it.
4. Enjoy downloading files!
# Not working?
1. Enable popups
@sayar
sayar / filter.css
Created Mar 13, 2015
Standard CSS3 Filters Example
View filter.css
img {
filter: grayscale(50%) opacity(10%);
}
@keyframes filter-animation {
0% {
filter: opacity(0);
}
50% {
filter: opacity(100%);
@sayar
sayar / app.js
Created Jun 5, 2016
Emotion API Node.js Sample Code
View app.js
var request = require('request');
request({
method: 'POST',
url: 'https://api.projectoxford.ai/emotion/v1.0/recognize',
headers: {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': 'PUT KEY HERE'
},
body: JSON.stringify({