Skip to content

Instantly share code, notes, and snippets.

View vimagick's full-sized avatar
🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰

K̶e̶v̶i̶n̶ vimagick

🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰
View GitHub Profile
@vimagick
vimagick / blescan.sh
Last active February 6, 2024 03:35
hcitool lescan (with 30 sec window)
#!/bin/bash
set -euo pipefail
BLE_DEV=hci0
DEDUP_WINDOW=30
MQTT_BROKER=broker.hivemq.com
MQTT_PORT=8883
MQTT_QOS=2
MQTT_TOPIC=blescan
@super-ultraman
super-ultraman / make-rir-delegated-latest.py
Created November 27, 2020 06:12 — forked from nickfox-taterli/make-rir-delegated-latest.py
make afrinic/apnic/arin/ripe/lacnic delegated-latest ipv4 and ipv6 list script
#!/usr/bin/env python
# vim:fileencoding=utf-8
""" [NAME] script or package easy description
[DESCRIPTION] script or package description
"""
from datetime import datetime
from argparse import ArgumentParser
import pprint
rhcloud.com
freepornfull.com
justmysize.com
kompoz.me
allwomenstalk.com
lindamedic.com
maximonline.ru
planetromeo.com
www.net.cn
javjunkies.com
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 6, 2024 21:33
set -e, -u, -o, -x pipefail explanation
@ThomasLeister
ThomasLeister / cloud-ubuntu-netplan-secondary-ip-static.md
Created May 25, 2018 08:30
Ubuntu netplan config for secondary ip address

In case there's already a DHCP config for netplan for the private IP address:

File: /etc/netplan/50-cloud-init.yaml

Contents:

# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
@peterhellberg
peterhellberg / ffserver.conf
Last active May 27, 2024 06:54
MJPEG stream from Webcam using FFServer and FFMpeg
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 200M
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@evantoli
evantoli / GitConfigHttpProxy.md
Last active July 5, 2024 08:58
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@luxas
luxas / Dockerfile
Last active November 29, 2017 16:10
Build Kubernetes binaries for ARM on amd64
FROM golang:1.5.2
MAINTAINER Lucas Käldström <lucas.kaldstrom@hotmail.co.uk>
# Enable cgo cross-compilation for armel
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list \
&& curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \
&& dpkg --add-architecture armel \
&& apt-get update \
&& apt-get install -y build-essential crossbuild-essential-armel rsync upx
@dropmeaword
dropmeaword / browser_history.md
Last active April 5, 2024 17:37
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.