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
-- Use this to configure NodeMCU to connect your AP | |
local STATION_CONFIG = {} | |
STATION_CONFIG.ssid = "my ssid" | |
STATION_CONFIG.pwd = "my password" | |
STATION_CONFIG.auto = true | |
STATION_CONFIG.save = true | |
wifi.setmode(wifi.STATION) | |
wifi.sta.config(STATION_CONFIG) |
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
#!/usr/bin/env python3 | |
# Public domain | |
import argparse | |
import os | |
import os.path | |
import shutil | |
import sys | |
def reorder(directory, sorted_, recurse, verbose): |
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
Elisa Viihde -skriptejä | |
======================= | |
Erilaisia skriptejä Elisa Viihteen käyttöön. Laita kaikki skriptit `/usr/local/bin`-hakemistoon ja anna niille suoritusoikeudet (`chmod +x`). | |
`elisa_url.py` on Python-skripti, joka hakee videotiedoston url-osoitteen annetun sivun url-osoitteen perusteella. Sitä käytetään yleensä osana jotain muuta skriptiä, kuten tässä olevat bash-skriptit. | |
`elisa_latain.sh` on bash-skripti, joka lataa videon annetun URL-osoitteen perusteella annettuun hakemistoon käyttäen `elisa_url.py`:tä ja `wget`:iä. Sitä käytetään antamalla toiseksi viimeiseksi parametriksi videon sivun osoite ja viimeiseksi kohdetiedosto. Muut parametrit annetaan suoraan `wget`:lle. | |
`elisa_katso.sh` on bash-skripti, joka toistaa videon VLC-soittimella ladaten sitä samaan aikaan `wget`:llä. Se käyttää `elisa_url.py`:tä ja myös `inotifywait`:iä, mikäli se on käytettävissä. Videon katselun päätyttyä eli kun VLC suljetaan, video poistetaan koneelta. Oletus tallennuspaikka on `/tmp`-hakemistossa, mutta sit |
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
#!/bin/sh | |
# This script is made by Tomi Leppänen aka Tomin (http://tomin.dy.fi/) | |
# You are free to use, copy, redistribute and modify this script | |
# as long as you accept that ***I won't take any responsibility | |
# for this code and it comes without any warranty*** | |
# This script downloads Kernel.org webpage and prints out a table | |
# of latest Linux releases | |
KERNEL_ORG=www.kernel.org |
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
#!/bin/sh | |
# This script is made by Tomi Leppänen aka Tomin (http://tomin.dy.fi/) | |
# You are free to use, copy, redistribute and modify this script | |
# as long as you accept that ***I won't take any responsibility | |
# for this code and it comes without any warranty*** | |
# This script works as pastebincl would but it takes the URL from | |
# the output of pastebincl and pastes it to clipboard. | |
# It is recommended to alias this script to some better name |
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
#!/bin/sh | |
# This script is made by Tomi Leppänen aka Tomin (http://tomin.site/) | |
# You are free to use, copy, redistribute and modify this script | |
# as long as you accept that ***I won't take any responsibility | |
# for this code and it comes without any warranty***. | |
# This script takes a screenshot from the part of screen that you can | |
# select by mouse and then it saves the screenshot to your Dropbox | |
# folder (location set by DIRECTORY variable) and then pastes a shared | |
# link to clipboard. |