Skip to content

Instantly share code, notes, and snippets.

Dave Davis davedavis

Block or report user

Report or block davedavis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d6af70b8dfeb7044825e99652f9a9a5f
from bs4 import BeautifulSoup
from urllib import request
x = 4
print(x)
testlist = {1,2,3,4}
for num in testlist:
print(num)
View gist:93b60e1252fc9dcb59352d662e5f80a2
python3
ranger
neofetch
net-tools
postgres
apache2
flask
htop
View gist:afd22fe0eb0e3035cececfcc4a6a77af
sudo apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386
sudo dpkg --add-architecture i386
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
@davedavis
davedavis / gist:f62e3273f6876847cdb97b8e9b097339
Created Jan 27, 2020
Install Google Ads Editor on Ubuntu (2020)
View gist:f62e3273f6876847cdb97b8e9b097339
// Download from : https://dl.google.com/adwords_editor/google_ads_editor.msi
// Set up wine 5: https://gist.github.com/davedavis/afd22fe0eb0e3035cececfcc4a6a77af
// Then in the same directory as the downloaded file, run wine as:
wine msiexec /i ./google_adwords_editor.msi
@davedavis
davedavis / gist:ac48bbbef51c462256fac70d3ad2d03c
Created Feb 14, 2020
Selector for select HTML element (for using with onClick as opposed to onChange)
View gist:ac48bbbef51c462256fac70d3ad2d03c
/* assuming we have the following HTML
<select id='s'>
<option>First</option>
<option selected>Second</option>
<option>Third</option>
</select>
*/
var select = document.getElementById('s');
View gist:86187e6965ef7cae42a3791ee399ecc1
FROM INTERNAL:
ssh -R 12345:localhost:22 dave@externalserverIPaddress
That’ll set up a reverse SSH tunnel from your external server (listening on port 12345) to your internal server
Then SSH to your external server when you’re at home and then connect through the tunnel by running :
ssh dave@127.0.0.1 -p 12345
You can’t perform that action at this time.