Skip to content

Instantly share code, notes, and snippets.

@kuamit5516
kuamit5516 / Fix-Slow-apt-get-update-Optimize-Kali-Linux-2019
Created January 22, 2019 12:00
Fix-Slow-apt-get-update-Optimize-Kali-Linux-2019-New-Working-Code
Open Terminal and type - leafpad /etc/resolv.conf
add this - nameserver 8.8.8.8
nameserver 8.8.4.4
save and exit
now open new terminal and type - leafpad /etc/apt/sources.list
add this - #Repositories :
deb http://kali.cs.nctu.edu.tw/kali kali-rolling main contrib non-free
deb-src http://kali.cs.nctu.edu.tw/kali kali-rolling main contrib non-free
now save and exit
@tuyenld
tuyenld / OpenWRT.md
Last active February 19, 2021 17:26
Openwrt

seit

how to revert to stock firmware WR840N v5

Hi all. I want to share some experience how to revert to stock firmware WR840N v5.

  • 1.Copy or wget original(stock) firmware to /tmp folder on LEDE
  • 2.Strip original image with dd cmd to remove bootloader part from image
  • 2.1. SSH to LEDE cd to /tmp and run:
@shatil
shatil / punnel.py
Created July 27, 2016 17:37
Python OpenSSL libraries' private key signing vs. OpenSSL's rsautl
#!/usr/bin/env python
from __future__ import print_function
import base64
import sys
PEM = ("""-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAgK1Q6Ydi8UUheJLvnTYJE65NOZtAtjDdDSxS+6b4x9EakjIylljSzs5uLEJn
@hlissner
hlissner / codesign_gdb.md
Last active March 11, 2024 07:09
Codesign gdb on OSX
@vpontis
vpontis / copy.py
Last active January 11, 2024 18:59
Copy to clipboard from iPython on Mac OS X
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%copy hello world
# will store "hello world"
@lonelymtn
lonelymtn / mirror-port.sh
Created February 4, 2016 23:28
Mirror traffic between two interfaces using Linux's traffic controll subsystem (tc)
#!/usr/bin/env bash
# Time-stamp: <2014-07-31 13:31:43 (ryanc)>
#
# Description: Mirror traffic between two interfaces using Linux's
# traffic control subsystem (tc)
trap cleanup EXIT
CLEANUP=1
SRC_IFACE=$1
@wdullaer
wdullaer / install.sh
Last active July 11, 2024 08:59
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@visioncan
visioncan / CasksInstall.sh
Last active December 29, 2021 01:56
CasksInstall
#!/bin/bash
# xcode command tool
xcode-select --install
# check
xcode-select -p
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@bencord0
bencord0 / system_uuid.sh
Last active August 31, 2023 11:51
Unique id for a linux system
#!/bin/bash
cat /var/lib/dbus/machine-id && exit
# Provided by dbus, hence available on all systemd systems.
# Any user can read it and it is persistent accross boots.
# It is unique per installation, and works well in VMs.
# Not all systems (i.e. stage3 gentoo/handbook install)
# have dbus installed by default.
cat /sys/class/dmi/id/product_uuid && exit
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: