-
you need to have node.js installed
-
copy main.js & package.json to a new folder
-
in the terminal:
-
to build it, run:
npm install
and thennpm start
-
to pack it like a regular app, use 'electron-packager'. install it globally by running:
npm install electron-packager -g
-
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/md5" | |
"encoding/binary" | |
"fmt" | |
"os" | |
"sync/atomic" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
''' | |
Instagram shortcode to media id | |
media id to shortcode | |
''' | |
sid = 'BFBQEQDxVqV' | |
# 1243345632996186773 | |
nid = '' | |
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. Use it to add custom menus to Google Docs that allow the user to run | |
* custom scripts. For more information, please consult the following two | |
* resources. | |
* | |
* Extending Google Docs developer guide: | |
* https://developers.google.com/apps-script/guides/docs | |
* | |
* Document service reference documentation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:loc=location.href; | |
title=document.title; | |
x=document.getElementsByClassName("editable entry-body"); | |
y=window.open(); | |
y.document.write("<html><body><h3>Links: "+loc+"</h3>\n"); | |
var todolist = document.getElementsByClassName("editable entry-body"); | |
for(var i = 0; i < todolist.length; i++) { | |
var todo = todolist[i].innerText; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import numpy | |
from exceptions import ValueError | |
class PushID(object): | |
# Modeled after base64 web-safe chars, but ordered by ASCII. | |
PUSH_CHARS = ('-0123456789' | |
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
title = ''; | |
setitle = ''; | |
if (window.getSelection) setitle = window.getSelection(); | |
if (document.getSelection) setitle = document.getSelection(); | |
if (document.selection) setitle = document.selection.createRange().text; | |
str = ''; | |
str = title.toString(); | |
if (str.length == 0) title = document.title; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To create a clone of pad CWrp961Hnw as of revision 3: | |
// http://sketchpad.cc/sp/pad/newsketch?clonePadId=CWrp961Hnw&cloneRevNum=3 | |
// -------------------------------------------------------------------------------- | |
// in etherpad/src/etherpad/control/pad/pad_control.js | |
// -------------------------------------------------------------------------------- | |
import("etherpad.collab.collab_server.buildHistoricalAuthorDataMapForPadHistory"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Index | |
--------------------------------------------------------------------- | |
curl -XPUT http://localhost:9200/pictures/ -d ' | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"index_analyzer": { | |
"tokenizer": "standard", |
NewerOlder