Skip to content

Instantly share code, notes, and snippets.

View wehmoen's full-sized avatar
:fishsticks:
Always working

wehmoen wehmoen

:fishsticks:
Always working
View GitHub Profile
@wehmoen
wehmoen / export.js
Created December 5, 2021 15:07
FriendlyFire 7 Donation Export
const axios = require("axios");
async function getDonors(page = 1, donors = []) {
const url = `https://api.betterplace.org/de/api_v4/fundraising_events/39665/opinions.json?per_page=100&page=${page}`;
const data = await axios.get(url);
console.log(`Loaded page ${page}/${data.data.total_pages} with ${data.data.data.length} donors.`)
donors = donors.concat(data.data.data);
if (data.data.current_page === data.data.total_pages) {
return donors;
const steem = require("steem");
async function getBinary(block, tx, hoster) {
return new Promise((resolve, reject) => {
steem.api.getBlock(block, (e, r) => {
if (!r.transaction_ids.includes(tx)) {
resolve([])
} else {
resolve(r.transactions.filter(x => x.transaction_id === tx)[0].operations.filter(x => x[0] === "custom" && x[1].required_auths.includes(hoster)))
}
@wehmoen
wehmoen / load.js
Created December 27, 2019 14:59
load bgb
This file has been truncated, but you can view the full file.
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (Buffer){
const steem = require("steem");
async function getBinary(block, tx, hoster) {
return new Promise((resolve, reject) => {
steem.api.getBlock(block, (e, r) => {
if (!r.transaction_ids.includes(tx)) {
resolve([])
} else {
@wehmoen
wehmoen / community.js
Created November 23, 2019 18:18
Steem Communiy Creation
const sprintf = require("util").format;
const assert = require("assert");
const steem = require("steem");
const creatorActiveKey = "your_active_key";
const creatorPostingKey = "your_posting_key";
const creatorPublicMemoKey = "your_public_memo_key";
const creator = "your_account";
async function setProps(community, admin, title, description) {
@wehmoen
wehmoen / claim_browser.js
Last active July 31, 2019 01:42
claim_browser.js
const account = SE.User.name;
async function getTokensToClaim() {
let claimAble = [];
let token = await (await fetch('https://scot-api.steem-engine.com/@' + account, {method: 'GET'})).json();
for (let i in token) {
if (token[i].pending_token > 0) {
claimAble.push({
@wehmoen
wehmoen / claim.js
Created July 14, 2019 20:09
Claim all pending SCOT rewards
const fetch = require("node-fetch");
const steem = require("steem");
const account = "scot";
const wif = "5KYeFYCTtFAqoor4dBt4CDbLXnPyKbP2gmoPWpHtgspJ47MbWQh";
async function getTokensToClaim() {
let claimAble = [];
let token = await (await fetch('https://scot-api.steem-engine.com/@' + account, {method: 'GET'})).json();
@wehmoen
wehmoen / rc.js
Created January 31, 2019 02:45
Get RC account
const getAccountRC = async (account) => {
try{
const rawResponse = await fetch('https://api.steemit.com/', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":[account]}, "id":1})
});
@wehmoen
wehmoen / codes.txt
Created July 29, 2018 16:04
DTube Voucher DEMO codes
2S9Z8C-CJR9
2U9QZJ-N9CY
FSHDZM-WEPJ
G3WLQR-SSRJ
XF93YY-MZD9
4JZ8FL-NWEW
HNMA25-JS62
FRZNAZ-MG3B
BDUVVY-HLGG
MPTQSC-AH9E
@wehmoen
wehmoen / status.html
Created April 5, 2017 08:03
Minecraft Server Status with jQuery
<script>
$(function () {
var host = "griefergames.net";
var port = 25565;
$('.serverHost').text(host + ':' + port);
window.checkServerStatus = setInterval(function () {
$.ajax({
url: 'https://mc.x64.rocks/status/?host=' + host + '&port=' + port,
success: function(data) {