Skip to content

Instantly share code, notes, and snippets.

@vsivsi
vsivsi / instructions.md
Last active September 11, 2015 18:46
Add Atom editor as a supported application for Papers2 Citations on OS X

Edit the file:

/Applications/Papers2.app/Contents/SharedSupport/Citations.app/Contents/Resources/AppSupportInformation.plist

...
<key>SupportsInsertionOfCitations</key> <!-- Find this key -->
<array>
...
 com.github.atom 
@vsivsi
vsivsi / fetch_data.sh
Last active April 17, 2017 19:02
Grab event and log data from a Cyperpower UPS with RMCARD205 installed
#! /bin/sh
# Note that this script may fail if there are multiple copies running at the same time
# Or if a person is logged into the device Web Management UI
# It should recover on future runs once the contention is released
# Default read only user/pass
export CPWUSER=device
export CPWPASS=cyber
# Default IP address
export UPSIP=129.168.10.134
@vsivsi
vsivsi / cleardns.sh
Created May 9, 2017 17:46
Clear DNS cache on El Cap / Sierra
# Run with sudo
dscacheutil -flushcache
killall -HUP mDNSResponder
@vsivsi
vsivsi / system-update.sh
Created May 21, 2017 00:20
Mac OS post install
# Run this file once. It will restart to finish the MacOS update
# If the developer tools are already installed, it does nothing. So it is safe to run it again.
# Get the names from HOSTNAME env, which comes from DNS reverse lookup
sudo scutil --set ComputerName $HOSTNAME
sudo scutil --set HostName $HOSTNAME
sudo scutil --set LocalHostName $HOSTNAME
# This sets the system clock to UTC, although the System Preferences UI won't show it.
# sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
@vsivsi
vsivsi / debug.txt
Created May 25, 2017 18:09
debug output
$ terraform apply
nomad_job.import_snapshot: Refreshing state... (ID: import_snapshot)
nomad_job.import_snapshot: Modifying... (ID: import_snapshot)
nomad_job.import_snapshot: Modifications complete (ID: import_snapshot)
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
@vsivsi
vsivsi / outline.md
Last active March 14, 2018 21:53
Problem statements

Defining and Defending Project Scope


This is one of the most critical things!


  • Problem Statement(s)
  • Formal documentation of Project Scope
@vsivsi
vsivsi / badplot.ipynb
Created February 24, 2020 18:32
Repro of gophernotes + gonum/plot issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@vsivsi
vsivsi / vegalite.ipynb
Last active April 17, 2020 06:55
Gophernotes + VegaLite = Awesome
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<Instruction name="VPOPCNTD" summary="Packed Population Count for Doubleword Integers">
<InstructionForm gas-name="vpopcntd" xmm-mode="AVX">
<ISA id="AVX512VPOPCNTDQ"/>
<ISA id="AVX512VL"/>
<Operand type="xmm{k}{z}" input="false" output="true"/>
<Operand type="m128/m32bcst" input="true" output="false"/>
<Encoding>
<EVEX mm="10" pp="01" LL="00" W="0" vvvv="0000" V="0" RR="#0" B="#1" X="#1" b="#1" aaa="#0" z="#0" disp8xN="16"/>
<Opcode byte="55"/>
<ModRM mode="#1" reg="#0" rm="#1"/>