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 / cyr_sanitize_title.php
Created March 7, 2017 10:43
Функция за автоматична транслитерация от кирилица към латиница на адресите в Wordpress
function cyr_sanitize_title($title) {
global $wpdb;
$iso9_table = array(
'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G',
'Д' => 'D', 'Е' => 'E', 'Ж' => 'J', 'З' => 'Z',
'И' => 'I', 'Й' => 'Y', 'К' => 'K', 'Л' => 'L',
'М' => 'M', 'Н' => 'N', 'О' => 'O', 'П' => 'P',
'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U',
'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'CH',
'Ш' => 'SH', 'Щ' => 'SHT', 'Ъ' => 'A', 'Ь' => 'Y',
@dimobelov
dimobelov / copyPoison.js
Created April 8, 2017 08:04
CopyPoison mod 24chasa.bg
;(function () {
var chars = 'MHAEKBOXΠPCToĸaepcyxIiJjSs' + 'АВЕКМНОПРСТХаекорсухІіЈјЅѕ';
var cfg = { length: 50, link: 'true', prefix: 'Копирано от ', suffix: ' © www.24chasa.bg' }, script;
if (script = document.currentScript) {
cfg.length = script.getAttribute('data-length') || cfg.length;
cfg.link = script.getAttribute('data-link') || cfg.link;
cfg.prefix = script.getAttribute('data-prefix') || cfg.prefix;
cfg.suffix = script.getAttribute('data-suffix') || cfg.suffix;
}
@dimobelov
dimobelov / WP_Cleanup.php
Last active May 17, 2017 23:10
Функции за почистване на Wordpress от ненужна информация
<?php
/**
* Remove meta name=generator
*/
public function remove_wp_version() {
remove_action( 'wp_head', 'wp_generator' );
add_filter( 'revslider_meta_generator', array( $this, 'remove_revslider_metadata' ) );
$this->remove_visual_composer_metadata();
@dimobelov
dimobelov / google-scripts-loading.html
Created June 3, 2017 15:02
Как Google зарежда javascipt на блоговете си.
<-- от https://blog.google -->
<div id="base-scripts" data-scripts='[
{ "url": "https://storage.googleapis.com/gweb-uniblog-publish-prod/static/blog/js/data-layer-analytics.da7f878b7c0e.js",
"options": {
"async": false,
"defer": false
}
},
{ "url": "https://storage.googleapis.com/gweb-uniblog-publish-prod/static/blog/js/gtm.d797bb14a102.js",
"options": {
@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
  • 꽁냥꽁냥
public static string[] BulgarianWords =
{
"а",
"автентичен",
"аз",
"ако",
"ала",
"бе",
"без",
"беше",