Skip to content

Instantly share code, notes, and snippets.

View xsnpdngv's full-sized avatar

Tamás Dezső xsnpdngv

View GitHub Profile
#!/bin/sh
sudo mkdir -p /mnt/linux
sudo mount /dev/sda1 /mnt/linux
for i in /sys /proc /run /dev /dev/pts; do sudo mount --bind "$i" "/mnt/linux$i"; done
sudo chroot /mnt/linux
@xsnpdngv
xsnpdngv / smb.conf
Last active November 18, 2017 17:22
enable linux to access asus router's samba share
##########################
### ON THE CLIENT SIDE ###
##########################
# to be put into the global section of the file /etc/samba/smb.conf
# (if there is no such: sudo apt-get install smbclient)
client use spnego = no
# To connect other (normal) Samba servers:
client use spnego = yes
client schannel = auto
@xsnpdngv
xsnpdngv / sata_alpm
Last active April 20, 2017 19:03
Powersaving by enabling SATA Agressive Link Power Management
sudo apt-get install powerstat pm-utils powertop
echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm
sudo pm-powersafe true
sudo powertop --auto-tune
@xsnpdngv
xsnpdngv / README.md
Last active December 13, 2025 08:21
Chromium OS install

NeverWare built a Chromium OS based image to be easily installed, named CloudReady. Its home edition is free. It is available for both 32 and 64 bit. The image will work on most machines.

Considerables

Boot

The available options: Dual boot with Windows (>XP), or Standalone.

@xsnpdngv
xsnpdngv / cpufreq-sh
Last active September 8, 2020 08:49
Set CPU governor to powersave on Ubuntu
#!/bin/sh
sudo apt-get install cpufrequtils
echo 'GOVERNOR="powersave"' | sudo tee /etc/defaults/cpufrequtils
sudo /etc/init.d/cpufrequtils restart
cpufreq-info
@xsnpdngv
xsnpdngv / com.ubuntu.enable-hibernate.pkla
Created May 1, 2017 00:04
Enable hibernate option in Ubuntu: Create or edit under: /etc/polkit-1/localauthority/50-local.d/
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
@xsnpdngv
xsnpdngv / imagemagick
Created May 2, 2017 13:36
Convert image to progressive and compressed
convert -strip -interlace Plane -quality 80 input-file.jpg output-file.jpg
@xsnpdngv
xsnpdngv / NERDTree.mkd
Created May 5, 2017 08:29 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@xsnpdngv
xsnpdngv / Free O'Reilly Books.md
Created June 20, 2017 22:39 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@xsnpdngv
xsnpdngv / ftpsh
Last active November 8, 2017 14:01
FTP bash script
#!/bin/bash
# ============================================================================
# @file ftpsh
# @brief Script to execute command line arguments as FTP command
# @author Tamas Dezso <dezso.t.tamas@gmail.com>
# @date November 8, 2017
# ============================================================================
if [ $# -lt 1 ]
then