Skip to content

Instantly share code, notes, and snippets.

View c1sc0's full-sized avatar
🥝
bewi

Krisztian Somogyi c1sc0

🥝
bewi
View GitHub Profile
@c1sc0
c1sc0 / gist:1f8756ebbc305cb69996139ddc24ab22
Created September 10, 2017 10:53 — forked from rlex/gist:7841736d679f0afba0d12d8324c24999
IPv6 minimal firewall for mikrotik
add chain=input comment="Router: Allow established connections" connection-state=established
add chain=input comment="Router: Allow related connections" connection-state=related
add chain=input comment="Router: Allow IPv6 ICMP" protocol=icmpv6
add action=drop chain=input comment="Drop everything else"
add chain=forward comment="LAN: Allow established connections" connection-state=established
add chain=forward comment="LAN: Allow related connections" connection-state=related
add chain=forward comment="LAN: Allow IPv6 ICMP" protocol=icmpv6
#example rule for opening port
add chain=forward comment="LAN: Allow SSH" dst-port=22 protocol=tcp
add chain=forward comment="Allow any to internet" out-interface=sixbone
@c1sc0
c1sc0 / custom.js
Created February 5, 2017 01:07 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.

Git cheat sheet

Common commands

General

Create repository:

git init
@c1sc0
c1sc0 / tmux.md
Created April 20, 2016 09:47 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@c1sc0
c1sc0 / tmux-cheatsheet.markdown
Created April 20, 2016 07:20 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname