Skip to content

Instantly share code, notes, and snippets.

@maop
maop / create-hotspot.md
Created December 8, 2019 21:58 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@maop
maop / tint2rc.txt
Created August 27, 2017 22:27 — forked from ututogit/tint2rc.txt
BunsenLabs Minimo tint2 config
#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see the BunsenLabs Tint2 config thread:
# https://forums.bunsenlabs.org/viewtopic.php?id=254
# Background definitions
@maop
maop / dlAttachments.py
Last active August 29, 2015 14:26 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
<?php
require_once('Crypto.php');
function setKey(){
try {
$key = Crypto::CreateNewRandomKey();
// WARNING: Do NOT encode $key with bin2hex() or base64_encode(),
// they may leak the key to the attacker through side channels.
} catch (CryptoTestFailedException $ex) {
die('Cannot safely create a key');
} catch (CannotPerformOperationException $ex) {
@maop
maop / gist:130864
Created June 16, 2009 20:12 — forked from gnuget/gist:130856
get your public ip
#!/usr/bin/env python
import urllib
def show_ip():
print urllib.urlopen("http://tuip.info/ip").read()
if __name__ == "__main__":
show_ip()