Skip to content

Instantly share code, notes, and snippets.

View amarao's full-sized 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 / gist:1c4b218ed04fb3c669f09ba8903c9e75
Created July 26, 2025 09:56
random snippet from reddit
let n,e=null;async function i(){return e||(e=async function(){if(n=window.navigation,!n){console.log("Navigation API not supported, loading polyfill");try{const{applyPolyfill:e}=await import("./apply-polyfill-abfabee6.js");n=e()}catch{console.log("Navigation polyfill failed to initialize.")}}}()),e}!function(n,e,o,t,a,d,r){var c=!1,l=!1,s=[],f=function(n){("e"in n||"p"in n||n.f&&n.f.indexOf("capture")>-1||n.f&&n.f.indexOf("withScope")>-1||n.f&&n.f.indexOf("showReportDialog")>-1)&&u(s),f.data.push(n)};function u(e){function o(){i().then((()=>import("https://www.redditstatic.com/shreddit/sentry-bc0d3b33.js"))).then((i=>{try{n[d]=i.default,n[t]=p,n[a]=h;var o=n[d],c=o.init;o.init=function(n){var e=r;for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);c(e)},function(e,i){try{for(var o=f.data,d=0;d<e.length;d++)"function"==typeof e[d]&&e[d]();var r=!1,c=n.__SENTRY__;void 0!==c&&c.hub&&c.hub.getClient()&&(r=!0);var l=!1;for(d=0;d<o.length;d++)if(o[d].f){l=!0;var s=o[d];!1===r&&"init"!==s.f&&i.ini
[tool.poetry]
name = "foo"
version = "1.1.1"
authors = ["Your Name <[email protected]>"]
license = "Proprietary"
readme = "README.md"
include = ["foo/templates/*", "foo/templates/**/*"]
exclude = ["outputs/**", "foo/tests/**"]
@amarao
amarao / nova.trace
Last active February 6, 2023 14:48
Feb 06 14:24:10 infra2 nova-api-wsgi[82345]: 2023-02-06 14:24:10.387 82345 ERROR nova.api.openstack.wsgi [None req-96870c4e-a5fc-48d0-9ce1-a6e370f4f2da d991fc9b15754c53905754ee78368243 5f98bd21f329455d94d8a304747e840d - - default default] Unexpected exception in API method: nova.exception.NovaException: None of the segments of network 3b434226-e2d9-4ba3-b264-b370285cc169 prov>
2023-02-06 14:24:10.387 82345 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2023-02-06 14:24:10.387 82345 ERROR nova.api.openstack.wsgi File "/openstack/venvs/nova-26.0.0/lib/python3.9/site-packages/nova/api/openstack/wsgi.py", line 664, in wrapped
2023-02-06 14:24:10.387 82345 ERROR nova.api.openstack.wsgi return f(*args, **kwargs)
2023-02-06 14:24:10.387 82345 ERROR nova.api.openstack.wsgi File "/openstack/venvs/nova-26.0.0/lib/pyt
---
- name: Deploy artifacts
hosts: deployment,targets
gather_facts: false
vars:
venv_sections:
- horizon
- neutron
- nova
- glance
use std::cmp::*;
#[derive(Debug, Clone, PartialOrd, PartialEq, Eq)]
struct Zero {
index: usize,
}
#[derive(Debug, Clone, PartialOrd, PartialEq, Eq, Ord)]
struct Segment {
start: usize,
@amarao
amarao / ceph.txt
Last active September 10, 2021 14:09
ceph with single copy of data
PG_STAT OBJECTS MISSING_ON_PRIMARY DEGRADED MISPLACED UNFOUND BYTES OMAP_BYTES* OMAP_KEYS* LOG DISK_LOG STATE STATE_STAMP VERSION REPORTED UP UP_PRIMARY ACTING ACTING_PRIMARY LAST_SCRUB SCRUB_STAMP LAST_DEEP_SCRUB DEEP_SCRUB_STAMP SNAPTRIMQ_LEN
2.1f 86 86 0 258 0 186443 0 0 86 86 active+recovery_wait+remapped 2021-09-10T14:07:32.911653+0000 60'86 79:31 [3] 3 [3,0,4] 3 0'0 2021-09-10T13:01:55.246941+0000 0'0 2021-09-10T13:01:21.322639+0000 0
2.1e 92 92 92 184 0 6910486 0 0 93 93 active+recovery_wait+degraded+remapped 2021-09-10T14:07:40.248405+0000 60'93 79:37 [6] 6 [6,4,5] 6 0'0 2021-09-10T13:01:52.298971+0000
@amarao
amarao / changelog.rst
Last active February 12, 2021 12:49
possible ansible-base 2.11 changelog (generated from git 2021-02-12)

Ansible Base 2.10 "When the Levee Breaks" Release Notes

Topics

@amarao
amarao / dyn_provision.yaml
Created July 9, 2020 13:12
Dynamic provision in ansible
- 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 August 6, 2019 14:32
check for check_mode for ansible
- 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
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",