chmod 722 /home/mastodon/live/public/system/cache
chmod 722 /home/mastodon/live/public/system/media_attachments
# reset permissions
chmod 777 /home/mastodon/live/public/system/cache
This file contains 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
function postToMastodon(event) { | |
try { | |
if (event) { | |
const range = event.range; | |
console.log( | |
`cell in column ${range.columnStart} and row ${range.rowStart} was updated` | |
); | |
// const folder = DriveApp.getRootFolder(); |
This file contains 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
(async () => { | |
const domain = "..."; | |
const token = "..."; | |
const postUrl = "..."; | |
let response; | |
response = await fetch( | |
`https://${domain}/authorize_interaction?uri=${postUrl}`, | |
{ | |
headers: { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" | |
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" |
This file contains 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 simple Twitter bot that posts random images. | |
Tutorial: https://botwiki.org/resource/tutorial/random-image-tweet/ | |
*/ | |
const fs = require('fs'), | |
path = require('path'), | |
Twit = require('twit'), | |
config = require(path.join(__dirname, 'config.js')), | |
images = require(path.join(__dirname, 'images.js')); |
This file contains 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 simple Twitter bot that posts random images. | |
Tutorial: https://botwiki.org/resource/tutorial/random-image-tweet/ | |
*/ | |
const fs = require('fs'), | |
path = require('path'), | |
Twit = require('twit'), | |
config = require(path.join(__dirname, 'config.js')); |
This file contains 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 copy of https://gist.github.com/airhadoken/8742d16a2a190a3505a2 | |
See also: https://botwiki.org/bots/twitterbots/emoji__polls/ | |
*/ | |
var T = require("twit"); | |
var Q = require("Q"); | |
// key and secret for Twitter for iPhone. | |
// A whitelisted app is needed to access the cards API; you can't just create your own currently. |
This file contains 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
# Original: https://paste.wuffs.org/raw/160201.220633.4garttu6 | |
from twitter import * | |
import json | |
import sys | |
import mysql.connector | |
import random | |
conn = mysql.connector.connect(user='wikistuff', password='ffutsikiw', unix_socket='/var/run/mysqld/mysqld.sock', database='wikistuff') | |
c = conn.cursor() |
This file contains 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
<?php | |
if (isset($_REQUEST["owapikey"]) && isset($_REQUEST["units"]) && isset($_REQUEST["location"])){ | |
$owapikey = $_REQUEST['owapikey']; | |
$units = $_REQUEST['units']; | |
$location = $_REQUEST['location']; | |
$request = json_decode(file_get_contents("http://api.openweathermap.org/data/2.5/weather?q={$location}&units={$units}&APPID={$owapikey}")); | |
$weather = array( |
This file contains 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
<?php | |
if (isset($_REQUEST["owapikey"]) && isset($_REQUEST["units"])){ | |
$ip = $_SERVER['REMOTE_ADDR']; | |
$owapikey = $_REQUEST['owapikey']; | |
$units = $_REQUEST['units']; | |
// $request = json_decode(file_get_contents("http://smart-ip.net/geoip-json/{$ip}")); | |
$latitude = $request->latitude; |