Skip to content

Instantly share code, notes, and snippets.

View xsnpdngv's full-sized avatar

Tamás Dezső xsnpdngv

View GitHub Profile
@xsnpdngv
xsnpdngv / README.md
Last active April 21, 2017 12:54
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 / 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 / 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
#!/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 / sources.list
Created April 8, 2017 19:35
apt sources
# deb cdrom:[Ubuntu 17.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://hu.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://hu.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://hu.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
@xsnpdngv
xsnpdngv / profiling.md
Created February 17, 2017 12:42
Profiling HowTo

Profiling with Callgrind

Callgrind is a profiling tool that can be used via the Valgrind framework and its report can be displayed/inspected with the KCachegrind profile data visualization tool.

Install

@xsnpdngv
xsnpdngv / batteryFullNotif.vbs
Last active October 28, 2021 03:18
battery full notification VB script
' Battery Full Notification VBS - checking in each 5 min
' To start automatically on logon, put into the directory that opens on:
' Win+R: Open: [shell:startup] -> [OK]
' (C:\Users\YOU\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)
set oLocator = CreateObject("WbemScripting.SWbemLocator")
set oServices = oLocator.ConnectServer(".","root\wmi")
set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
for each oResult in oResults
iFull = oResult.FullChargedCapacity
@xsnpdngv
xsnpdngv / exportEachPageToSvg.vba
Created February 17, 2017 09:43
Visio macro to export each page to svg
Sub exportSvg()
Dim formatExtension As String
formatExtension = ".svg"
' initializations
folder = ThisDocument.Path
Set doc = Visio.ActiveDocument
folder = doc.Path
@xsnpdngv
xsnpdngv / passwordless_login.md
Last active February 17, 2017 12:37
ssh key generation and placement for passwordless login

Generate identity locally

cd $HOME/.ssh
ssh-keygen -f id_rsa -t rsa

This will result: id_rsa, id_rsa.pub.

@xsnpdngv
xsnpdngv / overload.h
Last active February 19, 2017 21:19
C function-like macro overload
/* overload for function-like macros with various number of named arguments */
#define OVERLOAD(Func, .../* Arg1[, Arg2[, Arg3]] */) \
FUNC_SEL(__VA_ARGS__, Func##3, Func##2, Func##1, x)(__VA_ARGS__)
#define FUNC_SEL(Arg1, Arg2, Arg3, Func, ...) Func
#define FUNC(/* arg1[, arg2[, arg3]] */ ...) OVERLOAD(FUNC, __VA_ARGS__)
#define FUNC2(arg1, arg2) arg1#arg2 /* whatever to do with 2 args */
#define FUNC3(arg1, arg2, arg3) arg1#arg2#arg3 /* whatever to do with 3 args */