Skip to content

Instantly share code, notes, and snippets.

View daurrutia's full-sized avatar

David daurrutia

  • D.C.
View GitHub Profile
@superseb
superseb / rke2-commands.md
Last active July 3, 2024 02:07
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@ksafranski
ksafranski / expecting.md
Last active November 11, 2023 23:00
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@darkoperator
darkoperator / instposhsshdev
Last active April 26, 2023 05:17
Install Posh-SSH Dev
$webclient = New-Object System.Net.WebClient
$url = "https://github.com/darkoperator/Posh-SSH/archive/master.zip"
Write-Host "Downloading latest version of Posh-SSH from $url" -ForegroundColor Cyan
$file = "$($env:TEMP)\Posh-SSH.zip"
$webclient.DownloadFile($url,$file)
Write-Host "File saved to $file" -ForegroundColor Green
$targetondisk = "$($env:USERPROFILE)\Documents\WindowsPowerShell\Modules"
New-Item -ItemType Directory -Force -Path $targetondisk | out-null
$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace($file)
@seanwash
seanwash / mediaqueries.css
Created December 12, 2012 00:44
Basic list of media queries. They inherit from Desktop -> Mobile
/* -- Media Queries ----------------------------------------------------- */
/* ---------------------------------------------------------------------- */
/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}
/* Desktops and laptops ----------- */
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.