Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Payravi KevinPayravi

View GitHub Profile
@KevinPayravi
KevinPayravi / get-wiki-tweets.js
Last active Nov 18, 2022
A console script that can be run on a MediaWiki wiki to extract all tweets linked in the mainspace.
View get-wiki-tweets.js
/*
A console script that can be run on a MediaWiki wiki to extract all tweets linked in the mainspace.
To run this: visit a MediaWiki wiki, open your browser's developer console, paste this code in, and press enter.
It will print and re-print a growing array of Tweets until it is done searching.
How does this janky script work?
It first searches MediaWiki for all pages that contain the text "twitter".
Trying to search for URLs (i.e. twitter.com) is unreliable depending on a wiki's search infrastructure.
This script then grabs the wikitext from all these pages and uses regex to search for any Tweet URLs.
@KevinPayravi
KevinPayravi / logwatcher.sh
Created Feb 27, 2021 — forked from waggz81/logwatcher.sh
Valheim Server Discord Alerts
View logwatcher.sh
#!/bin/bash
##########################
# Change these variables #
##########################
FILE="/path/to/console.log"
WEBHOOK_URL="CHANGEME"
STEAMKEY="CHANGEME"
##########################
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
View locale-en.json
{
"COMMON": {
"YES": "Yes",
"NO": "No",
"OR": "or",
"LOADING": "Loading...",
"DATE": "DD MMM YYYY",
"DATETIME": "DD MMM YYYY HH:mm",
"SAVE": "Save",
"CANCEL": "Cancel",
View temp.css
/* This file has been modified from its original version by Kevin Payravi */
@charset "UTF-8";
.introjs-helperLayer,.introjs-overlay{
-webkit-transition:all .3s ease-out;
-moz-transition:all .3s ease-out;
-ms-transition:all .3s ease-out;
-o-transition:all .3s ease-out;
box-sizing:content-box
}
@KevinPayravi
KevinPayravi / keybase.md
Created Apr 17, 2015
Keybase identity proof
View keybase.md

Keybase proof

I hereby claim:

  • I am KevinPayravi on github.
  • I am kevinpayravi (https://keybase.io/kevinpayravi) on keybase.
  • I have a public key whose fingerprint is FFA4 54E5 2C80 B519 F7B7 3EC5 A279 B2E6 8E5C 2BB1

To claim this, I am signing this object: