Skip to content

Instantly share code, notes, and snippets.

View leslie-leder's full-sized avatar

Leslie Leder leslie-leder

View GitHub Profile

show protocol in url bar modify about:config

set following properties in 'about:config'

browser.urlbar.trimURLs;false

browser.urlbar.unifiedcomplete;false

Mount cifs/smb/ntfs

chmod u+s /usr/sbin/mount.cifs

Dns: enable short name resolution

/etc/sysconfig/network-scripts/ifcfg-$IF_NAME

SEARCH="yourdomain.com"
@leslie-leder
leslie-leder / Ansible Cheat Sheet.md
Last active April 1, 2016 09:24
Ansible Cheat Sheet

Create User with Password

create a password on the command line:

[jpork@titania ansible]$ openssl passwd -salt salty -1 nice-password
$1$salty$1iSO7pdZGKyvOSE/eE0eF.

use password in ansible:

tasks:

@leslie-leder
leslie-leder / Gnome 3 - Tweaks.md
Last active May 20, 2016 09:02
Gnome 3 Tweaks

Keep primary display workspace steady when selecting windows on secondary display without workspaces

gsettings set org.gnome.mutter workspaces-only-on-primary true

Dolphin with icons

edit file /usr/share/applications/org.kde.dolphin.desktop

replace

Exec=dolphin %u

@leslie-leder
leslie-leder / Gradle - list publication info.gradle
Created March 1, 2016 13:01
Gradle - list publication info
publishing {
repositories.each {repo->
println("repo: ${repo.url}")
}
}
allprojects{
afterEvaluate {
println(">>")
project.publishing.publications.each{publication->

see also cifs manual

Install required package cifs-utils:

dnf install cifs-utils

If regular users shall be able to mount set mount.cifs permissions:

chmod u+s /sbin/mount.cifs

Toggle dock command:

dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.ShowDock int32:2 

Add this command as the desktop shortcut.

@leslie-leder
leslie-leder / find.lua
Last active November 20, 2015 09:27
Textadept
-- ~/.textadept/find.lua
-- Fill the find field with the current buffer selection
--
-- Thanks to Mitchell and Niklas W from [email protected]
keys.cf = function()
local s = buffer.selection_start
local e = buffer.selection_end
if s ~= e then

/etc/dhcp/dhclient.conf

reboot 0;
interface "$INTERFACE_NAME"{
  supersede host-name "host-name";
  supersede domain-name "domain.com";
  supersede domain-search "domain.com";
  request subnet-mask, broadcast-address, time-offset, routers, domain-search, domain-name, domain-name-servers;
}
VBoxManage list extpacks
VBoxManage list vms
VBoxManage list runningvms

VBoxManage unregistervm $VM_NAME --delete

VBoxManage import virtual-machine.ova --vsys 0 --vmname $VM_NAME

Start and Stop

VBoxHeadless --startvm $VM_NAME