Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am tonylovesdevops on github.
* I am worthit (https://keybase.io/worthit) on keybase.
* I have a public key ASDNuCed952OWkzNEEODkQOfl1fU5qsQ_au0lOCUaCAK3Qo
To claim this, I am signing this object:
@TonyLovesDevOps
TonyLovesDevOps / main.dart
Created December 11, 2022 13:48
operators.dart typecast error
// Reproduces error in https://github.com/fireship-io/dart-course/blob/main/bin/operators.dart#L37-L39
void main() {
var number = 23 as String;
number is String; // true
}

Keybase proof

I hereby claim:

  • I am tonyflint on github.
  • I am tonyflint (https://keybase.io/tonyflint) on keybase.
  • I have a public key ASAncmhi9MOgW9A1N6FMqkEa1MQvHLc-OJi0I3wKZNV51go

To claim this, I am signing this object:

@TonyLovesDevOps
TonyLovesDevOps / .kitchen.yml
Last active September 17, 2015 21:59
Error installing chef-reporting gem on older chef-clients
---
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: ubuntu-12.04-11.16.0
driver:
================================================================================
Error executing action `converge` on resource 'machine[multi]'
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
Option name must be a kind of String! You passed {:network_interface_id=>"eth0", :device_index=>0, :subnet_id=>"subnet-foo", :description=>"String", :private_ip_address
=>"foo.foo.foo.foo", :delete_on_termination=>false, :private_ip_addresses=>[{:private_ip_address=>"foo.foo.foo.foo", :primary=>false}], :secondary_private_ip_address_count=>1, :associa
te_public_ip_address=>false}.
@TonyLovesDevOps
TonyLovesDevOps / gist:cd5add132d778e6d3078
Created May 5, 2015 17:39
libguestfs debugging scratchpad
pino|work: tonyflint: can you please also check what filesystem holds the image file? (you can easily check using `stat -f /path/to/vmbuilder2.sea1.qcow2`)
[tflint@r620a0301 vmbuilder2.sea1]$ stat -f vmbuilder2.sea1.qcow2
File: "vmbuilder2.sea1.qcow2"
ID: 81100000000 Namelen: 255 Type: xfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 658511201 Free: 589119249 Available: 589119249
Inodes: Total: 527066304 Free: 527066279
@TonyLovesDevOps
TonyLovesDevOps / gist:92f03bb52fdfca60325e
Created May 5, 2015 17:37
virt-copy-in as user with unset LIBGUESTFS_QEMU (failure)
Environment details:
Host OS: CentOS 6.6
Packages:
libguestfs-tools-1.20.11-11.el6.x86_64
libguestfs-1.20.11-11.el6.x86_64
libguestfs-tools-c-1.20.11-11.el6.x86_64
qemu-kvm version: QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2-2.448.el6_6), Copyright (c) 2003-2008 Fabrice Bellard
# Output from command: unset LIBGUESTFS_QEMU && LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=0 virt-copy-in -a vmbuilder2.sea1.qcow2 hosts /etc/ &>/tmp/virt-copy-as-user-unset
@TonyLovesDevOps
TonyLovesDevOps / gist:54bdf423f5cedfb742fe
Created May 5, 2015 17:25
virt-copy-in as sudo (failure)
# Output from command: sudo LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=0 virt-copy-in -a vmbuilder2.sea1.qcow2 hosts /etc/ &>/tmp/virt-copy-as-sudo
libguestfs: create: flags = 0, handle = 0x253e6f0
libguestfs: launch: attach-method=appliance
libguestfs: launch: tmpdir=/tmp/libguestfsN2FJRG
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: command: run: febootstrap-supermin-helper
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ -f checksum