Skip to content

Instantly share code, notes, and snippets.

View williamcanin's full-sized avatar
🐍
Simple is better than complex.

William C. Canin williamcanin

🐍
Simple is better than complex.
View GitHub Profile
@williamcanin
williamcanin / if_case.sh
Last active August 29, 2015 14:27
Test If and Case using "Curl -L" through Gist
#!/bin/bash
# Test If and Case using "Curl -L" through Gist
#
#
if [[ "$(id -u)" != "0" ]]; then
echo "You are not root!"
echo "You have the root password? (y/n)"
read -p "Reply: " reply
@williamcanin
williamcanin / progress_percent.sh
Last active August 29, 2015 14:27
ProgressPercent. As parameters option beginning, end, seconds and message text.
#!/bin/bash
# Type script: Shell
# Program: Progress percent
# Description: Shell script function to demonstrate a process according with percentage inserted seconds.
# Version: 1.0.0
#
#------------------------------------------Using --------------------------------------------
# _PROGRESS_PERCENT "begin_percent" "end_percent" "seconds_time_of_progress" "message"
#
# NOTE: For cancel process, using: Ctrl+C
@williamcanin
williamcanin / eclipse.sh
Last active December 2, 2015 06:37
Installing the latest version of Eclipse on Linux, as shortcut creations and symbolic links
#!/bin/bash
# Type script: Shell
# Program: Eclipse {Lastet version <present>}
# Description: Installing the latest version of Eclipse on Linux,
# as shortcut creations and symbolic links
# Version: 1.0.1
#
#------------------------------------------Using --------------------------------------------
#
@williamcanin
williamcanin / A-start-job-is-running-for-dev-disk-by-code1.sh
Last active August 29, 2015 14:27
lsblk-f for post: Linux Boot: A start job is running for dev-disk-by (williamcanin.com)
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs Dados-Ntfs 66E421B71C85E362
├─sda2
├─sda3 ext4 fedora ef0da60e-1bf5-4a7c-92d4-25999c784ad5
├─sda5 ext4 87daa4d7-ec56-460f-ab11-b2788aa373ec /mnt/home
├─sda6 ext4 db5b49b3-200a-4172-b036-1b5f42dbe73e
├─sda7 swap 035b2802-752a-45b6-a87c-c4d466cdf53d [SWAP]
└─sda8 ext4 archlinux 2253f584-8ff4-46c2-9cf6-386415684be8 /
sr0
@williamcanin
williamcanin / A-start-job-is-running-for-dev-disk-by-code2.sh
Last active August 29, 2015 14:27
"/etc/fstab" of ArchLinux for post: Linux Boot: A start job is running for dev-disk-by (williamcanin.com)
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
UUID=2253f584-8ff4-46c2-9cf6-386415684be8 / ext4 rw,relatime,data=ordered 0 1
UUID=4aed3ea2-5d85-4bc2-96e2-abc6ad877640 none swap defaults 0 0
UUID=87daa4d7-ec56-460f-ab11-b2788aa373ec /mnt/home ext4 defaults,auto,rw 0 1
@williamcanin
williamcanin / Criando-pendrive-bootavel-no-Linux-com-dd-code1.sh
Last active August 29, 2015 14:27
"Mount" for post: Criando pendrive bootavel no Linux com dd (williamcanin.com)
william @archlinux $
└‣ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1996208k,nr_inodes=499052,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda8 on / type ext4 (rw,relatime,data=ordered)
.
.
/dev/sdb on /run/media/william/sandisk type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1002,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
@williamcanin
williamcanin / test01.sh
Last active August 29, 2015 14:27
test
Arrow keys navigate the menu. <Enter> selects submenus ---> (or empty submenus ----). Highlighted letters │
│ are hotkeys. Pressing <Y> includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> │
│ for Help, </> for Search. Legend: [*] built-in [ ] excluded <M> module < > module capable │
│ │
│ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ [*] 64-bit kernel │ │
│ │ General setup ---> │ │
│ │ [*] Enable loadable module support ---> │ │
│ │ -*- Enable the block layer --->
@williamcanin
williamcanin / compilando-e-instalando-o-kernel-em-modo-tradicional-code1.sh
Last active August 29, 2015 14:28
Gist for post: Linux: Compilando e instalando o kernel em modo tradicional - code1 (https://williamcanin.com)
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
Subsystem: Sony Corporation Device 908b
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>
.
. # Resto do counteúdo retirado por ser extenso
.
13:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
Subsystem: Sony Corporation Device 908b
@williamcanin
williamcanin / compilando-e-instalando-o-kernel-em-modo-tradicional-code2.sh
Created August 25, 2015 02:21
Gist for post: Linux: Compilando e instalando o kernel em modo tradicional - code2 (https://williamcanin.com)
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
|__ Port 2: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 2: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 5: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 5: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
@williamcanin
williamcanin / modbl
Created September 29, 2015 16:05
"Modbl" add/remove modules (Linux) to a blacklist.
#!/bin/bash
# --------------------------------------------------------------------------------
# Name: ModBlackList
# Executable: modbl
# Type: Shell
# Description: ModBlackList is a simple script to create a list of blocked modules.
# Credits: William C. Canin <http://williamcanin.com>
# Home page author: http://williamcanin.com
# Province: Brazil/SP
# License: (MIT)