Skip to content

Instantly share code, notes, and snippets.

George Shuklin amarao

  • Servers.com
  • Limassol, Cyprus
Block or report user

Report or block amarao

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
@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
@amarao
amarao / blame-praise.py
Created Sep 11, 2017
Example of argparse with subparsers for python
View blame-praise.py
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
View fuck.xml
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xml:lang="en-US">
<s:Header>
<a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/EnumerateResponse</a:Action>
<a:MessageID>uuid:BFBAB472-44A3-4776-B2DE-CD373164FECA</a:MessageID>
<a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
<a:RelatesTo>uuid:ec9ad2e9-56f2-16f2-8002-4f11553e16fa</a:RelatesTo>
</s:Header>
<s:Body>
<n:EnumerateResponse>
You can’t perform that action at this time.