Skip to content

Instantly share code, notes, and snippets.

@sayar
sayar / yammer-group-download-all-images.js
Last active November 28, 2016 18:19 — 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.
/*
# 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 / app.js
Created June 5, 2016 00:45
Emotion API Node.js Sample Code
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({
@sayar
sayar / memory_leak.html
Created September 16, 2015 14:09
FITC - Advanced JavaScript Debugging
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Memory Leak</title>
<meta name="author" content="@ramisayar">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
@sayar
sayar / app.js
Last active August 29, 2015 14:19
FITC - What's New in ES6 for Web Devs - Sample code from my presentation
'use strict';
// app.js
import * as math from "math";
alert("2π = " + math.add(math.pi, math.pi));
@sayar
sayar / server.js
Created March 22, 2015 18:04
Hands-on: Build a Node.js-powered chatroom web app | Part 1: Introduction to Node.js
var http = require('http');
var port = process.env.port || 1337;
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port);
@sayar
sayar / filter.css
Created March 13, 2015 19:00
Standard CSS3 Filters Example
img {
filter: grayscale(50%) opacity(10%);
}
@keyframes filter-animation {
0% {
filter: opacity(0);
}
50% {
filter: opacity(100%);
// Use absolute URLs to navigate to anything not in your Router.
// Only need this for pushState enabled browsers
if (Backbone.history && Backbone.history._hasPushState) {
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble
$(document).delegate("a", "click", function(evt) {
// Get the anchor href and protcol
var href = $(this).attr("href");
var protocol = this.protocol + "//";