Skip to content

Instantly share code, notes, and snippets.

View adamramadhan's full-sized avatar
Sparkles

Adam Ramadhan adamramadhan

Sparkles
View GitHub Profile
@gjreasoner
gjreasoner / README.md
Last active April 25, 2024 01:42
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@lesgle
lesgle / routeros_ip_list_generator.sh
Created October 12, 2017 10:09 — forked from Jamesits/routeros_ip_list_generator.sh
Convert bgp.he.net search result to RouterOS IP List
#!/bin/bash
# https://gist.github.com/Jamesits/944ab9a484ad34522f6c4bce8d085132
# Captures every IP-CIDR notation in HTML file
# then convert it to RouterOS IP List format
# Usage: convert.sh source-file.html List-Name
# Then use /import file-name=List-Name.scr to
# import this list on RouterOS
# You can save bgp.he.net search result as HTML
# then use this script to convert.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@sivel
sivel / better-ssh-authorized-keys-management.md
Last active July 12, 2024 04:25
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@ichernev
ichernev / lruqueue.js
Created August 5, 2012 22:15
Node.js zmq guide examples
// Least-recently used (LRU) queue device in Node.js
var startClientsAndWorkersNowait = true
, terminate = 'skip'; // 'immediately', 'later', 'skip'
var numberOfClients = 10
, numberOfWorkers = 3;
var zmq = require('zmq')
, frontend = zmq.socket('router')
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@baudehlo
baudehlo / save_attach.js
Created June 18, 2012 18:17
Haraka Plugin to save attachments to disk
var fs = require('fs');
// Bind to receiving of data
exports.hook_data = function( next, connection, params ) {
var haraka = this,
uid = connection.transaction.uuid;
connection.transaction.notes.attachments = {};
@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@hrldcpr
hrldcpr / tree.md
Last active June 8, 2024 18:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

NOTE: This documentation has been put here because I couldn't find it anywhere else. I am not associated with Crunchbase in any way. I cannot help you with your Crunchbase API problems. If you need help try here: https://groups.google.com/forum/#!forum/crunchbase-api

CrunchBase API v1 Documentation

Overview

The CrunchBase API provides JSON representations of the data found on CrunchBase. The API currently supports three actions: "show", "search", and "list", which are each described below.