I hereby claim:
- I am ignaciolg on github.
- I am nacholg (https://keybase.io/nacholg) on keybase.
- I have a public key ASA7yYCPacxsszkgZcJEmAp455Qf6teVS8PCdhUvFwpVLAo
To claim this, I am signing this object:
server { | |
#listening ip:port | |
listen 0.0.0.0:80 default_server; | |
#public data path | |
root /var/www/nginx/public/; | |
index index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name subdomain.domain; |
#man page freebsd | |
#https://www.freebsd.org/cgi/man.cgi?query=newfs_msdos&apropos=0&sektion=0&manpath=FreeBSD+5.2-RELEASE&format=html | |
#man page macosx | |
#https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/newfs_msdos.8.html | |
#FAT 32 Cluster Size 16Kb Volume "NAME" | |
sudo newfs_msdos -F 32 -c 32 -v NAME /dev/disk1 | |
#FAT 32 Cluster Size 32Kb Volume "NAME" |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
I hereby claim:
To claim this, I am signing this object:
# Using httpbin.org, and the next links | |
# https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-do-i-use-a-browser-to-dynamically-update-the-hosts-ip | |
# https://www.namecheap.com/support/knowledgebase/article.aspx/595/11/how-to-enable-dynamic-dns-option-for-a-domain | |
# setup a cron job and that's all | |
# works on sysnology scheduled task ;D | |
HOST="REPLACE BY YOUR HOST, LIKE @ OR ANY SUBDOMAIN"; | |
DOMAIN="REPLACE BY YOUR DOMAIN"; | |
PASSWORD="REPLACE BY YOUR PASSWORD"; | |
IP=$(curl -s https://httpbin.org/ip | python -c "import sys, json; print json.load(sys.stdin)['origin'].split(\",\")[0]"); | |
curl "https://dynamicdns.park-your-domain.com/update?host=$HOST&domain=$DOMAIN&password=$PASSWORD&ip=$IP" |
// only google chrome | |
const isChrome = (userAgent) => /^.(?!.*samsungbrowser).*chrome(?!.*opr|.*edg|.*Puffin|.*SamsungBrowser|.*YaBrowser|.*miui).*$/i.test(userAgent) | |
// only safari browser | |
const isSafari = (userAgent) => /^((?!chrome|android|opios|fxios).)*safari/i.test(userAgent); | |
// only edge based on chrome | |
const isEdge = (userAgent) =>/^.*edge?\//i.test(userAgent); | |
var readEnvConfiguration = function (name) { | |
var olinkfile = name || 'default'; | |
var data = ""; | |
var chunk; | |
var FileReader = Java.type("java.io.FileReader"); | |
var fr = new FileReader(olinkfile); | |
var config; | |
chunk = fr.read(); | |
while (chunk != -1) { | |
data += String.fromCharCode(chunk); |
#!/bin/sh | |
docker ps | grep -i portainer | |
CONTAINER=`docker ps | grep -i portainer | awk '{print $1}'` | |
docker stop $CONTAINER | |
docker rm $CONTAINER | |
docker run --label traefik.http.services.Portainer.loadbalancer.server.port=9000 -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest |
This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.
Any installed application can receive DIAL start requests by adding "dialAppName": "NAME"
in its appInfo.json
.
YouTube and Netflix apps have some special handling, but they still can be overriden by an unofficial app.
IMPORTANT: official YouTube app has "dialAppName": "youtube"
. Installed apps are (or rather seem to be) ordered lexicographically based on their IDs - when multiple apps declare the same dialAppName
the last one will be the one triggered via DIAL. (com.youtube.adfree
< youtube.leanback.v4
< youtube.leanforward
)
for i in *; do mv "$i" "$(echo $i|tr "A-Z -" "a-z_")"; done | |
# for i in *; do <command>; done # execute command for all files in folder | |
# mv "$i" ... # move the file to the destiny | |
# "$(echo $i|tr "string" "string")"# execute echo of the file, and pass it to tr to transform the string. the result will be used by mv |