Skip to content

Instantly share code, notes, and snippets.

View glego's full-sized avatar

Glenn Goffin glego

  • Frankfurt, Germany
View GitHub Profile
#!/bin/bash
# Description:
# Update the DNS A Record with your public IP address for the one.com host.
#
# Recommendation:
# - Create a separate user that can only access the DNS records.
# - Create a cron tab to run this script every 30 minutes:
# crontab -e
# */30 * * * * ~/Scripts/update-dns-one.com.sh >/dev/null 2&>1
# - To get the Sub Domain Id you will have to manually update the domain and record the network traffic using your browser
130|herolte:/ $ logcat | grep "InThePoche"
11-01 16:15:56.725 4907 20718 D ApplicationPolicy: isStatusBarNotificationAllowedAsUser: packageName = fr.gaulupeau.apps.InThePoche,userId = 0
11-01 16:15:56.733 5481 5481 D PhoneStatusBar: addNotification key=0|fr.gaulupeau.apps.InThePoche|1|EventProcessor|10305
11-01 16:15:56.757 24677 24677 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@c4d99f0 nm : fr.gaulupeau.apps.InThePoche ic=null
11-01 16:15:56.776 5481 5481 D PhoneStatusBar: No Fullscreen intent: 0|fr.gaulupeau.apps.InThePoche|1|EventProcessor|10305 isHeadsUped : false
11-01 16:15:58.937 4907 6400 D ApplicationPolicy: isStatusBarNotificationAllowedAsUser: packageName = fr.gaulupeau.apps.InThePoche,userId = 0
11-01 16:15:58.956 4907 6000 D ApplicationPolicy: isStatusBarNotificationAllowedAsUser: packageName = fr.gaulupeau.apps.InThePoche,userId = 0
11-01 16:15:59.008 5481 5481 D PhoneStatusBar: addNotification key=0|fr.gaulupeau.apps.InThePoche|1|EventProcessor|10305
msmetrics.ws.sonos.com
@glego
glego / opendemocracy.net.txt
Last active February 26, 2018 12:48
Graby opendemocracy.net issue
title: //h1
author: //div[contains(@class, 'entry-meta')]//a[@rel='author']
date: //meta[@property="article:published_time"]/@content
strip: //nav
strip: //header
strip: //div[contains(@class, 'comments')]
body: //div[contains(concat(' ',normalize-space(@class),' '),' post__content ')]
test_url: https://www.opendemocracy.net/neweconomics/time-fragile-temporality-carillions-accumulation-model/
#!/bin/bash
# ./upload.sh file.pdf
filename="$1"
cookiejar="cookiejar.txt"
username="username"
password="password"
fqdn="projectsend.domain.com"
echo "Uploading file $filename"
@echo off
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
nssm stop nginx
@echo off
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
nssm start nginx
@echo off
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
nssm restart nginx
@echo off
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
nssm remove nginx confirm
@echo off
IF "%NGINX_DIR%"=="" SET NGINX_DIR=%~dp0
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~dp0"" && ""%~0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
PsExec64.exe -s "%NGINX_DIR%\nginx.exe" -p %NGINX_DIR% -s reload