Skip to content

Instantly share code, notes, and snippets.

@vijo
vijo / titleUrlMarkdownClip.js
Created September 22, 2021 17:16 — forked from idelem/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@vijo
vijo / 2019-12-16
Created December 16, 2019 11:36
daily-2019-12-16
‎‎​

Keybase proof

I hereby claim:

  • I am vijo on github.
  • I am vijo (https://keybase.io/vijo) on keybase.
  • I have a public key whose fingerprint is F64B CD53 41B7 B4D6 73CB A224 A47B 03B0 C839 03D7

To claim this, I am signing this object:

@vijo
vijo / yt-embed.js
Created January 20, 2016 10:06 — forked from do18/yt-embed.js
If you are concerned about web site performance, you probably noticed that embedded YouTube iframes are costly. Instead of iframes, you may embed images that link to the respective videos, and make these links replace themselves with iframes when clicked. (IE 9+ because of getElementsByClassName.)
/*jshint maxlen: 79 */
var MYSITE = {};
/**
* Make YouTube links with .yt-embed replace themselves with YouTube
* iframes when clicked; firstElementChild is assumed to be the
* img element holding the poster frame; the YouTube URL must contain
* the "v" parameter and no further parameters.
*
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
import csv
import json
some_dict = {}
filename = "periodictabledump2.csv"
with open(filename, 'r', newline='') as csvfile:
ofile = csv.reader(csvfile, delimiter=',')
ofile.__next__()
@vijo
vijo / designer.html
Created November 27, 2014 08:29
designer
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@vijo
vijo / GmailHelper.java
Last active December 28, 2015 05:22 — forked from nutanc/GmailHelper.java
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.auth.oauth2.TokenResponse;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeRequestUrl;
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.googleapis.auth.oauth2.GoogleTokenResponse;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpTransport;