Skip to content

Instantly share code, notes, and snippets.

@step135
step135 / houdini-gradient-border-animation.markdown
Created November 20, 2020 08:16
Houdini gradient border animation
@step135
step135 / code-snippet.js
Created November 24, 2020 17:21 — forked from sawaYch/code-snippet.js
Firebase storage listAll() example.
// Load single image
// replace images/photo6244288433388366130.jpg with your image path
// You can find it on the firebase storage console
var imgRef = firebase.storage().ref().child('images/photo6244288433388366130.jpg');
imgRef.getDownloadURL().then(function(url){
var img = document.getElementById('img1');
img.src = url;
}).catch(function(error) {
const username = ""
const password = ""
const fs = require('fs');
const libpath = require('path');
const { GPhotos } = require('upload-gphotos');
const gphotos = new GPhotos();
@step135
step135 / submit.md
Created March 28, 2021 11:00 — forked from tanaikech/submit.md
Upload Files to Google Drive using Javascript

Upload Files to Google Drive using Javascript

News

At October 11, 2019, I published a Javascript library to to run the resumable upload for Google Drive. When this is used, the large file can be uploaded. You can also use this js library.

Description

This is a sample script for uploading files to Google Drive using Javascript. The files are uploaded by Drive API v3. gapi.client.drive.files.create() can create an empty file on Google Drive. But it cannot directly upload files including contents. I think that this might not be able to upload files and metadata with the multipart/related, although this might be resolved by the future update. So now, as one of workarounds, I use using XMLHttpRequest.

  • This sample uses gapi.
  • Before you use this, please enable Drive API at API console and carr
@step135
step135 / font-stacks.css
Created March 30, 2021 14:02 — forked from 001101/font-stacks.css
Similar looking fonts for Windows, Linux, Mac
.mono-font-stack {
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}
.times-font-stack {
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
}
.modern-font-stack {
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/*
*
* 2016-01-08: Added support for 5GHz networks. Specifying network
* type is optional. As a bonus you get less candidates. :-)
*
* 2021-05-20: All generated passwords are stored in a text file.
*
* P.S. Reversing eCos and broadcom CFE sux
*
* $ gcc -O2 -o upc_keys upc_keys.c -lcrypto
var background = (function () {
var tmp = {};
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
for (var id in tmp) {
if (tmp[id] && (typeof tmp[id] === "function")) {
if (request.path === "background-to-page") {
if (request.method === id) tmp[id](request.data);
}
}
}
var background = (function () {
var tmp = {};
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
for (var id in tmp) {
if (tmp[id] && (typeof tmp[id] === "function")) {
if (request.path === "background-to-page") {
if (request.method === id) tmp[id](request.data);
}
}
}
var background = (function () {
var tmp = {};
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
for (var id in tmp) {
if (tmp[id] && (typeof tmp[id] === "function")) {
if (request.path === "background-to-page") {
if (request.method === id) tmp[id](request.data);
}
}
}
var background = (function () {
var tmp = {};
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
for (var id in tmp) {
if (tmp[id] && (typeof tmp[id] === "function")) {
if (request.path === "background-to-page") {
if (request.method === id) tmp[id](request.data);
}
}
}