Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
Pushing buttons hard enough to get paid

George Shuklin amarao

⌨️
Pushing buttons hard enough to get paid
  • Servers.com
  • Limassol, Cyprus
View GitHub Profile
@amarao
amarao / changelog.rst
Last active Feb 12, 2021
possible ansible-base 2.11 changelog (generated from git 2021-02-12)
View changelog.rst

Ansible Base 2.10 "When the Levee Breaks" Release Notes

Topics

v2.10.3

@amarao
amarao / dyn_provision.yaml
Created Jul 9, 2020
Dynamic provision in ansible
View dyn_provision.yaml
- name: Creating instances for dynamic inventory
hosts: somegroup
gather_facts: false
tasks:
- name: Create VM
delegate_to: localhost
os_server:
name: '{{ instance_name }}'
auto_ip: false
flavor: '{{ flavor }}'
@amarao
amarao / play.yaml
Created Aug 6, 2019
check for check_mode for ansible
View play.yaml
- hosts: localhost
gather_facts: false
tasks:
- name: check_mode=true check_mode_supported=false
command: date
check_mode: true
- name: check_mode=false check_mode_supported=false
command: date
check_mode: false
- name: check_mode=absent check_mode_supported=false
View minifb_sleep
extern crate minifb;
use std::time::{Duration, Instant};
use std::thread::sleep;
use minifb::{Key, WindowOptions, Window};
fn main() {
let mut buffer: Vec<u32> = vec![0; 2048 * 1024];
let mut window = Window::new("Test - ESC to exit",
View good.json
This file has been truncated, but you can view the full file.
[
187603,
190185,
199509,
183983,
182403,
184522,
371415,
372966,
View degenerate.json
This file has been truncated, but you can view the full file.
[
532824,
533688,
561690,
570123,
563779,
571631,
573299,
581294,
View gist:9856494f69cc28e6280351e3a5fac5ec
$ dpkg-architecture -L
uclibc-linux-armel
uclibc-linux-i386
uclibc-linux-ia64
uclibc-linux-alpha
uclibc-linux-amd64
uclibc-linux-armeb
uclibc-linux-arm
uclibc-linux-arm64
uclibc-linux-avr32
@amarao
amarao / mem_hog.py
Created Jun 4, 2018
Illustration for python memory fragmentation issue
View mem_hog.py
#!/usr/bin/python3
import random
import time
MAX_HOG = 1000*1000
def sparse(something):
for element in something:
victim = element["big"]
element["big"] = None
View bootstrap.yaml
- hosts: all
gather_facts: no
serial: 1
tasks:
- name: Remove old facts
meta: clear_facts
- name:
set_fact:
host_v1: '{{ansible_ssh_host}}'
host_v2: '{{ansible_host}}'
View gist:78656856f0644f73256df8854384bbca
totem {
version: 2
cluster_name: debian
token: 3000
token_retransmits_before_loss_const: 10
clear_node_high_bit: yes