Skip to content

Instantly share code, notes, and snippets.

var host = "localhost:9999"
var page = 1
var ws = new WebSocket("ws://" + host + "/devtools/page/" + page)
ws.onmessage = function(m) {console.log(m.data)}
var counter = 0
var send = function (method, params) {
ws.send(JSON.stringify({id: counter++, 'method': method, 'params': params}))
}
@also
also / gist:8758130
Created February 1, 2014 20:17
lead mathematica import
Import["http://lead.ryanberdeen.com/render?target=randomWalkFunction(%\
27hello%2C+world%27)", "JSON"]
var eslint = require('eslint');
var CLIEngine = eslint.CLIEngine;
var linter = eslint.linter;
var baseConfig = {format: 'stylish'};
console.log(baseConfig.format);
new CLIEngine({baseConfig: baseConfig}).getConfigForFile('.');
console.log(baseConfig.format);
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 20:26
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@also
also / a.cljs
Last active April 26, 2024 20:25
require-macros and syntax quoting
(ns a
(:require-macros [clojure.string :as alias]))
; this is fine
`xxx/name
; this throws clojure.lang.Symbol cannot be cast to clojure.lang.Namespace
`alias/name
@dicer
dicer / wifionice
Last active April 26, 2024 20:25 — forked from vollkorn1982/wifionice
HowTo auto connect your Linux to the German Wifi on ICE trains
#!/bin/bash
# change the next line to match your wifi device and put this file in /etc/NetworkManager/dispatcher.d/ and make it executable
WIFI_DEVICE=wlp3s0
IF=$1
STATUS=$2
@pythoninthegrass
pythoninthegrass / starship.toml
Last active April 26, 2024 20:24
Starship prompt setup
# SOURCES
# https://starship.rs/config
# https://starship.rs/presets/nerd-font.html#configuration
# DEBUG via:
# starship explain
# STARSHIP_LOG=trace
"$schema" = 'https://starship.rs/config-schema.json'
@nownabe
nownabe / instagram.rb
Created April 6, 2018 04:05
Instagram GraphQL API
# frozen_string_literal: true
require "faraday"
require "faraday_middleware"
endpoint = "https://www.instagram.com/graphql/query/"
# query_hash = "42323d64886122307be10013ad2dcc44"
# variables = '{"id":"3872941487","first":12,"after":"AQANkBj-f-ZzmLfmYiXU6qjC7nnHbpPttpppOPrL-i6mESM7hl04zzC50sCvA-RC3PFI98BtktoArwP9Ani1Z4dY067A1S6xvvhFqfgyJXJ5qw"}'
# csrf_token = "HIzZV98ydKLQmM6hGTtovnlqnrFwhsDf"