Skip to content

Instantly share code, notes, and snippets.

View thoughtsunificator's full-sized avatar
🤠

Romain Lebesle thoughtsunificator

🤠
View GitHub Profile
@thoughtsunificator
thoughtsunificator / tweet-parser.js
Created September 29, 2021 16:32
Tweet parser
export const STATE_SEARCHING = "STATE_SEARCHING"
export const STATE_TOKENIZING_HASHTAG = "STATE_TOKENIZING_HASHTAG"
export const STATE_TOKENIZING_MENTION = "STATE_TOKENIZING_MENTION"
export const PREFIX_HASHTAG = "#"
export const PREFIX_MENTION = "@"
export const tokenize = function(text) {
let characters = [...text]
let state = STATE_SEARCHING
let tokens = []
@thoughtsunificator
thoughtsunificator / BrowserExtensionReload.py
Last active September 29, 2021 16:16
Sublime Text User package for thoughtsunificator/browser-extension-reload-firefox
import websocket
try:
import thread
except ImportError:
import _thread as thread
import time
import json
import ssl
import sublime, sublime_plugin, os