Skip to content

Instantly share code, notes, and snippets.

View kamilion's full-sized avatar

Kamilion kamilion

View GitHub Profile
@SpotlightKid
SpotlightKid / test.sh
Last active August 30, 2024 08:46
Making a POST request with url or form-encoded params with MicroPython
$ micropython uget.py key1=value1 key2=value2 key2=value3
{'url': 'http://httpbin.org/get?key2=value3&key1=value1', 'headers': {'Host': 'httpbin.org', 'Connection': 'close'}, 'args': {'key2': 'value3', 'key1': 'value1'}, 'origin': 'XXX.XXX.XXX.XXX'}
$ micropython upost.py foo=bar spamm=42
{'files': {}, 'headers': {'Host': 'httpbin.org', 'Content-Length': '16', 'Content-Type': 'application/x-www-form-urlencoded', 'Connection': 'close'}, 'args': {}, 'form': {'spamm': '42', 'foo': 'bar'}, 'origin': 'XXX.XXX.XXX.XXX', 'data': '', 'json': None, 'url': 'http://httpbin.org/post'}
@stintel
stintel / gen.sh
Created August 17, 2017 00:02
gen.sh
#!/bin/sh
VHOST="$1"
TYPE="ecdsa"
DIGEST="sha512"
for san in $@; do
SAN+="--san $san "
done
@robinsmidsrod
robinsmidsrod / inventory.ipxe
Created July 16, 2015 22:48
iPXE hardware inventory script (from svenx)
# Run a PCI/SMBios/net inventory scan and upload the results. This gives us a
# way of tracking nodes to some extent, leaving us less blind than usual.
#
# We use the iPXE pciscan command to enumerate the PCI bus. For each device, we
# check the 'header type' register at offset 0x0e. If it's type 0 (endpoint),
# we can read the subsystem vendor and device registers too. Unfortunately, if
# the 7th bit of the header type field is set (0x80), it indicates a
# multi-function device. So to check the type, this bit should be masked out.
# Masking is not possible with iPXE commands, so we have to duplicate some of
# the iseq tests.
@fballiano
fballiano / build.sh
Last active April 25, 2021 10:37
Ubuntu Mini Remix
#!/bin/bash
# user: ubuntu pass: just hit ENTER
apt-get install vim ubuntu-defaults-builder live-build uck syslinux-utils coreutils
# open /usr/share/livecd-rootfs/live-build/auto/config and add PROJECT=base where there are all the variables
ubuntu-defaults-template ubuntu-defaults-umr
ubuntu-defaults-image --package ubuntu-defaults-umr_0.1_all.deb
mv binary.hybrid.iso ubuntu-mini-remix-15.10-amd64.iso
md5sum ubuntu-mini-remix-15.10-amd64.iso>ubuntu-mini-remix-15.10-amd64.iso.md5
mv ubuntu-mini-remix-15.10-amd64.iso* 15.10/
@JanJakes
JanJakes / 00-readme.md
Last active July 27, 2023 11:32
Ubuntu server with Nginx, uWSGI and Node.js installation & deployment setup

Ubuntu with Nginx, uWSGI & Node.js and it's deployment

This Gist contains instructions to setup Ubuntu server with Nginx, uWSGI & Node.js with that can serve for any Python apps (Django for instance) and will allow it's automatized deployment.

The content is as follows:

  • 01-ubuntu.md – A basic Ubuntu server setup.
  • 02-nginx-uwsgi-nodejs.md – Nginx, uWSGI and Node.js installation and setup.
  • 03-deployment.md – A server setup for automatized deployment.
  • 04-mariadb.md – Mariadb installation and setup.
@gschizas
gschizas / FixVirtualNetworkAdapters.ps1
Created February 15, 2013 05:11
Fix virtual network adapters
# see http://msdn2.microsoft.com/en-us/library/bb201634.aspx
#
# *NdisDeviceType
#
# The type of the device. The default value is zero, which indicates a standard
# networking device that connects to a network.
#
# Set *NdisDeviceType to NDIS_DEVICE_TYPE_ENDPOINT (1) if this device is an
# endpoint device and is not a true network interface that connects to a network.
# For example, you must specify NDIS_DEVICE_TYPE_ENDPOINT for devices such as