Skip to content

Instantly share code, notes, and snippets.

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

// unminifed version of https://apis.google.com/js/plusone.js
// see https://developers.google.com/+/plugins/+1button/#getting-started
window.___jsl = window.___jsl || {};
window.___jsl.h = window.___jsl.h || 'm;\/_\/apps-static\/_\/js\/gapi\/__features__\/rt=j\/ver=zVTxVnVbJog.en_US.\/sv=1\/am=!FRwcaGMpC1CIJ0aI4g\/d=1\/';
window.___jsl.l = [];
window.___gpq = [];
window.gapi = window.gapi || {};
window.gapi.plusone = window.gapi.plusone || (function () {
function f(n) {
var USER_ID = '106825171914368756519';
var API_KEY = 'AIzaSyCJU1qbrA9tWSkEIVBmzTKxvgo29ZwzirM';
var MAX_REQUEST_NUM = 100;
var doc = SpreadsheetApp.getActiveSpreadsheet();
var queryParams = {
maxResults: 20,
orderBy: "recent",
fields: "items(actor(displayName%2Cid)%2Cobject(attachments%2FfullImage%2Furl%2Ccontent%2Cplusoners%2Creplies%2Cresharers)%2Cpublished%2Ctitle%2Curl%2Cverb)%2CnextPageToken",
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}
@dimobelov
dimobelov / Facebook-xoxo-Congrats.md
Created August 17, 2017 10:35 — forked from ozh/Facebook-xoxo-Congrats.md
Facebook Congrats & Kisses animations

Hearts & kisses :

  • xo
  • xoxo
  • xoxoxo
  • Besos y abrazos
  • bisou
  • bisous
  • baci
  • 꽁냥꽁냥
@dimobelov
dimobelov / allow_svg_in_wordpress_tincymce.txt
Created August 28, 2017 11:41
Function & Filter to Allow Inline SVG in WordPress TinyMCE Editor.
function allow_svg_in_tinymce( $init ) {
// NOTE: This doesn't take into account any security concerns regarding SVG.
// It doesn't remove potential vulnerable elements, etc. It just allows
// SVG, as is, assuming that the uploader is trusted. However, it would
// be easy to remove elements such as script if desired. Just remove from
// the array.
$svgElemList = array(
'a',
A. Create Installation DVD ISO Via Dism:
1. Extract Win 10 Enterprise version of the mirror sources folder install.wim to D drive temp directory
2. In the temp directory to create WimMount folder, and execute the following command to mount the wim file
Dism /Mount-Wim /WimFile:D:\temp\install.wim /Index:1 /MountDir:D:\temp\WimMount
3. Show the current version
Dism /Image:D:\temp\WimMount /Get-CurrentEdition
4. Show current version
Dism /Image:D:\temp\WimMount /Get-TargetEditions
@dimobelov
dimobelov / GoogleAnalyticsApi.cs
Created April 6, 2018 20:10 — forked from 0liver/GoogleAnalyticsApi.cs
C# wrapper around the Google Analytics Measurement Protocol API
/* based on the docs at: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide */
/*
* LICENSE: MIT
* AUTOHR: oliver@teamaton.com
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@dimobelov
dimobelov / nginxproxy.md
Created June 21, 2018 05:30 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@dimobelov
dimobelov / mod_pagespeed .htaccess
Created July 13, 2018 10:21 — forked from solancer/mod_pagespeed .htaccess
mod_pagespeed .htaccess configuration
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"