This is a MacOS shell script for changing wallpaper to BING® Picture of the day.
Place the shell script into: ~/Pictures/Bing and the plist into ~/Library/LaunchAgents/.
Run once:
launchd load ~/Library/LaunchAgents/com.user.bing-wallpaper.plist| #!/bin/bash | |
| sed -i -e 's/80/81/' -e 's/443/444/' /usr/syno/share/nginx/server.mustache /usr/syno/share/nginx/DSM.mustache /usr/syno/share/nginx/WWWService.mustache | |
| synosystemctl restart nginx |
| const CACHE_TOKEN = 'NRJ14D_TOKEN' | |
| const SPOTIFY_CLIENT_ID = PropertiesService.getScriptProperties().getProperty('CLIENT_ID') | |
| const SPOTIFY_CLIENT_SECRET = PropertiesService.getScriptProperties().getProperty('CLIENT_SECRET') | |
| const REFRESH_TOKEN = PropertiesService.getScriptProperties().getProperty('REFRESH_TOKEN') | |
| const PLAYLIST_ID = PropertiesService.getScriptProperties().getProperty('PLAYLIST_ID') | |
| const ENERGY_HAMBURG_API_URL = 'https://api.nrjnet.de/webradio/playlist/energy/hamburg?day=0&hour=-1'; | |
| // fetch a new Spotify access token | |
| function getSpotifyAccessToken() { | |
| let token = CacheService.getScriptCache().get(CACHE_TOKEN); |
| #!/usr/bin/env python3 | |
| import csv | |
| import json | |
| import os | |
| import sys | |
| if len(sys.argv) < 2: | |
| print('Usage: {} <convertfile.(json|csv)>'.format(os.path.basename(sys.argv[0]))) | |
| exit(0) |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| "time" | |
| "unsafe" | |
| ) |
Bookmarklet that copies a shortened URL from popular shopping sites into the clipboard.
Just drag & drop this link -> Shorty <- to your bookmark bar. Edit it an paste as URL this text:
javascript:u=location.href;[[/^(https?:\/\/[a-z]+\.aliexpress\.com\/item\/[0-9]+\.html)\??.*$/,'$1'],[/^(https?:\/\/www\.ebay(?:\.[a-z]+)+\/itm\/)[^\/]+(\/[0-9]+)\??.*$/,'$1-$2'],[/^(https?:\/\/www\.gearbest\.com\/)[^\/]+(\/pp_[0-9]+\.html)\??.*$/,'$1-$2'],[/^(https?:\/\/\w+\.amazon\.[\w.]+\/).*?\/(B[A-Z0-9]+).*$/,'$1dp/$2'],[/^(https?:\/\/\w+\.alternate\.de\/).*?\/(product\/\d+).*$/,'$1$2'],[/^(https?:\/\/\w+\.conrad\.de\/).*?-(\d+\.html).*$/,'$1$2'],[/^(https:\/\/\www\.heise\.de\/).*(-\d+)\.html/,'$1$2'],[/^(https:\/\/\www\.golem\.de\/).*-(\d+)-(\d+)\.html/,'$1$2/$3']].forEach(r=>u=u.replace(r[0],r[1]));d=document;t=d.createElement('textarea');t.textContent=u;d.body.appendChild(t);s=d.getSelection();s.removeAllRanges();t.select();d.execCommand('copy');s.removeAllRanges();d.bo