This file contains hidden or 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
>> import fiscalyear | |
>> fiscalyear.setup_fiscal_calendar(start_month=4) | |
>> year = fiscalyear.FiscalYear(2021) | |
>> quarter = fiscalyear.FiscalQuarter.current() | |
>> print(year.start.year) | |
>> print(year.start.month) | |
>> print(year.start.day) | |
>> print(quarter) | |
>> print(type(quarter)) | |
>> print(quarter.start) |
This file contains hidden or 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
# Define the report date range: last 28 days including today | |
start=datetime.today().date().isoformat().replace("-", "") | |
end=datetime.now() + timedelta(days= - 28) | |
end= end.date().isoformat().replace("-","") |
This file contains hidden or 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
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 [email protected] -p 12345 |
This file contains hidden or 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
/* 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'); |
This file contains hidden or 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
// 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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
python3 | |
ranger | |
neofetch | |
net-tools | |
postgres | |
apache2 | |
flask | |
htop |
This file contains hidden or 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
from bs4 import BeautifulSoup | |
from urllib import request | |
x = 4 | |
print(x) | |
testlist = {1,2,3,4} | |
for num in testlist: | |
print(num) |
NewerOlder