Skip to content

Instantly share code, notes, and snippets.

View codertjay's full-sized avatar
🏠
Open to work

Favour (ThankGod) Afenikhena codertjay

🏠
Open to work
View GitHub Profile
@nateluzod
nateluzod / gist:1037289
Created June 21, 2011 05:14
HTML list of Canadian provinces
<select name="province" id="province">
<option value="AB">Alberta</option>
<option value="BC">British Columbia</option>
<option value="MB">Manitoba</option>
<option value="NB">New Brunswick</option>
<option value="NL">Newfoundland and Labrador</option>
<option value="NS">Nova Scotia</option>
<option value="NT">Northwest Territories</option>
<option value="NU">Nunavut</option>
<option value="ON">Ontario</option>
@steeve
steeve / _readme.md
Last active July 9, 2024 04:49
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@simonw
simonw / pixel_gif.py
Created April 9, 2014 07:27
Return a 1x1 pixel gif from Django (e.g. for a dynamic tracking pixel)
from django.http import HttpResponse
PIXEL_GIF_DATA = """
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
""".strip().decode('base64')
def pixel_gif(request):
return HttpResponse(PIXEL_GIF_DATA, content_type='image/gif')
@paulozullu
paulozullu / Fix.MD
Last active August 15, 2023 20:50
DigitalOcean without internet

After almost two weeks since I raised this issue, I was finally able to resolve it. The problem occurred in the first place because different packages got uninstalled somehow when I rebooted. This includes cloud-init, ufw and landscape-common. There is probably more that I haven’t noticed yet. Let’s start with the internet connection, this is how I fixed it:

  • Step 1. I created file “/etc/udev/rules.d/70-persistent-net.rules” and added
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b2:fe:09:35:6e:57", NAME="eth0"

as I mentioned previously. Note that MAC address used above can be found here: “/etc/netplan/50-cloud-init.yaml”

  • Step 2. Run “sudo reboot” and check that eth0 interface persists by running “ifconfig -a”