Skip to content

Instantly share code, notes, and snippets.

Silviu Vulcan silviuvulcan

Block or report user

Report or block silviuvulcan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View branch_fallback_Jenkinsfile
# checkout a repository with branch fallback
repos.split(',').each {
echo "Checking out ${it}"
dir("${it}"){
checkout resolveScm(
source: [
$class: 'GitSCMSource',
credentialsId: '51234-5678-9101-2131',
id: '_',
remote: "git@github.com:somebody/${it}.git",
View oneliners.md

My oneliners

Useful oneliners, no particular categories or order

Powershell allow local scripts

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
View sysadmin_by_doing_original.md

Sysadmin by doing

This is what I tell people to do, who ask me "how do I learn to be a Linux sysadmin?"

  1. Set up a KVM hypervisor.
  2. Inside of that KVM hypervisor, install a Spacewalk server. Use CentOS 6 as the distro for all work below. (For bonus points, set up errata importation on the CentOS channels, so you can properly see security update advisory information.)
  3. Create a VM to provide named and dhcpd service to your entire environment. Set up the dhcp daemon to use the Spacewalk server as the pxeboot machine (thus allowing you to use Cobbler to do unattended OS installs). Make sure that every forward zone you create has a reverse zone associated with it. Use something like "internal.virtnet" (but not ".local") as your internal DNS zone.
  4. Use that Spacewalk server to automatically (without touching it) install a new pair of OS instances, with which you will then create a Master/Master pair of LDAP servers. Make sure they register with the Spacewalk server. Do not allow anonymous bind, do not u
@silviuvulcan
silviuvulcan / README.md
Last active Dec 9, 2019
Mount 9p virtio inside VM
View README.md

Mount a host folder inside a VM using 9p virtio

/etc/initramfs-tools/modules

# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
View datto.md

If like me you bought a Datto Xeon-D Gigabyte motherboard here are some infos about them.

You can update at least the ipmi with stock gigabyte firmware

Also mine came with a BIOS password, I found this snippet online and indeed this was it:

By the way, if anyone bought one and needs the BIOS password, from my experience there's a 99.9% chance of it being either "R@str" or "Northern" or "NorthernLight$" (no quotes, caps as shown)

View rmate
#!/usr/bin/env bash
# rmate
# Copyright (C) 2011-2018 by Harald Lapp <harald@octris.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@silviuvulcan
silviuvulcan / ifttt-myepisodes.sh
Created Jul 9, 2019
Push a list of unwatched myepisodes to IFTTT
View ifttt-myepisodes.sh
#!/bin/bash
# unaquired feed
UNAQRSS='http://www.myepisodes.com/rss.php?feed=unacquired&showignored=0&uid=YOURUID&pwdmd5=YOURPWD'
if [ "$1" = "unwatched" ]; then
# unwatched feed
UNWARSS='http://www.myepisodes.com/rss.php?feed=unwatched&showignored=0&uid=icebox1701&pwdmd5=dcd899992143485371326b141e2db38e'
UNW=$(curl -s $UNWARSS | grep '<title>\[' | sed -e 's/<[^>]\+>//g' -e 's/^[ \t]*//' -e 's/\]\[/-/g' -e 's/\[\ //g' -e 's/\ \]//g' -e 's/$/<br>/')
UNWNO=$(echo "$UNW"| sed '/^\s*$/d'|wc -l)
if [ $((UNWNO)) -gt 0 ]; then
@silviuvulcan
silviuvulcan / dark-slack.ps1
Last active Jun 4, 2019
Sets a dark mode for slack. Run once after each update without slack running.
View dark-slack.ps1
$darkString = @'
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://cdn.jsdelivr.net/gh/laCour/slack-night-mode/css/raw/black.css',
success: function(css) {
let overrides = `
code { background-color: #535353; color: #85c5ff; } /* Change color: to whatever font color you want */
.c-mrkdwn__pre, .c-mrkdwn__quote { background: #535353 !important; background-color: #535353 !important; }
.p-threads_footer__input .p-message_input_field { background: #000 }
`
View 30detectproxy
# /etc/apt/apt.conf.d/30detectproxy:
# Fail immediately if a file could not be retrieved. Comment if you have a bad
# Internet connection
Acquire::Retries 0;
# undocumented feature which was found in the source. It should be an absolute
# path to the program, no arguments are allowed. stdout contains the proxy
# server, stderr is shown (in stderr) but ignored by APT
Acquire::http::ProxyAutoDetect "/etc/apt/detect-http-proxy";
@silviuvulcan
silviuvulcan / Controly.md
Created Nov 23, 2015
Launchy configurations
View Controly.md

evs C:/Program Files (x86)/Evernote/Evernote/ENScript.exe showNotes /q "$$"

evn C:\Program Files (x86)\Evernote\Evernote\Evernote.exe /NewNote

cmd C:\Windows\System32\cmd.exe

You can’t perform that action at this time.