Skip to content

Instantly share code, notes, and snippets.

View alambike's full-sized avatar

Javier Gómez Rodríguez alambike

View GitHub Profile
@tsaarni
tsaarni / README.md
Last active May 8, 2024 11:42
How to connect to Azure AKS Kubernetes node VM by SSH

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active July 14, 2024 12:33
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@vrdominguez
vrdominguez / dinaip
Last active March 26, 2017 09:39
Script para gestionar el demonio de dinaIp como un servicio más del sistema. Más info: http://vrdominguez.es/sustituir-dyndns-con-una-raspberry-y-dinaip/
#!/bin/bash
# Author: Victor Rodriguez, 2014
#
# /etc/init.d/dinaip
#
### BEGIN INIT INFO
# Provides: dinaIP daemon
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
@tknerr
tknerr / disqussion
Created January 26, 2014 12:33
Restored comments from DISQUS discussion about the environment cookbook pattern: http://vialstudios.logdown.com/posts/166848-the-environment-cookbook-pattern
--------------------------------
Torben Knerr • 19 days ago
Nice post! Finally some clarification on the different interpretations of what an application, library or wrapper cookbook is :-)
I have one question about the environment cookbooks though: what if you have two different applications (e.g. my_face and your_face) requiring a different set of dependencies running in the same environment?
IMHO locking dependency versions and exposing the public recipes / attributes via metadata.rb is a great thing, but it should be doable on a finer-grained basis than environments, namely on a per application (e.g. my_face) basis. For this exact reason I'm not using chef environments to lock the dependency versions, but rather something like an "uber application cookbook" which combines the properties of an application cookbook and the locking and documentation of an environment cookbook.
What do you think? And what would be a good name for it?
@gonzalo-bulnes
gonzalo-bulnes / XXXXXXXXXXXXX_add_authentication_token_to_users.rb
Last active March 6, 2019 15:15
(Update: I've packaged this gist into a gem to make its use easier, see: https://github.com/gonzalo-bulnes/simple_token_authentication.) Add token authentication to your Rails API. Follows the José Valim recomendations and is fully compatible with Devise (tokens are created the first time users sign in). See https://gist.github.com/josevalim/fb7…
# db/migrate/XXXXXXXXXXXXX_add_authentication_token_to_users.rb
class AddAuthenticationTokenToUsers < ActiveRecord::Migration
def change
add_column :users, :authentication_token, :string
add_index :users, :authentication_token, :unique => true
end
end
@plentz
plentz / nginx.conf
Last active July 22, 2024 11:19
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@eqhmcow
eqhmcow / unzip.pl
Last active December 31, 2022 18:49
Perl unzip example with IO::Uncompress::Unzip
#!/usr/bin/perl
# example perl code, but this should now actually work properly, even on
# Windows
# thanks to everyone who tested this, reported bugs and suggested or
# implemented fixes!
# this code is licensed under GPL 2 and/or Artistic license;
# aka free perl software