Skip to content

Instantly share code, notes, and snippets.

View Temikus's full-sized avatar

Artem Yakimenko Temikus

View GitHub Profile
@Temikus
Temikus / latency.txt
Created November 20, 2025 05:52 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Temikus
Temikus / Brewfile
Created October 25, 2021 04:56
Artem's Brewfile
# Common taps
tap "homebrew/cask-versions"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/core"
# Runtimes - python
brew "[email protected]"
brew "pylint"
@Temikus
Temikus / tf_graph
Last active August 29, 2015 14:21
Terraform draw cycles
terraform graph -draw-cycles -module-depth=-1 plan.tf | dot -Tpng > graph.png`
@Temikus
Temikus / gist:2ea2e79dae9862315499
Created April 27, 2015 18:57
Vagrant dep issues
λ vagrant plugin install --debug /Users/temikus/Code/vagrant-dev/vagrant-google/pkg/vagrant-google-0.1.4.gem (1)
INFO global: Vagrant version: 1.7.2
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"

Keybase proof

I hereby claim:

  • I am temikus on github.
  • I am temikus (https://keybase.io/temikus) on keybase.
  • I have a public key whose fingerprint is 75EA 0B04 1004 8AE5 C833 E73C 1818 2EDE 9A18 AA88

To claim this, I am signing this object:

@Temikus
Temikus / update_do.sh
Last active March 13, 2023 10:21
OpenWRT DDNS using DigitalOcean API
# Script for sending user defined updates using DO API
# 2015 Artem Yakimenko <code at temik dot me>
#
# activated inside /etc/config/ddns by setting
#
# option update_script '/usr/lib/ddns/update_do.sh'
#
# the script is parsed (not executed) inside send_update() function
# of /usr/lib/ddns/dynamic_dns_functions.sh
# so you can use all available functions and global variables inside this script
@Temikus
Temikus / break_bluetooth.sh
Created January 14, 2015 13:27
Mac break bluetooth
#!/bin/bash
# The following commands effectively break bluetooth on a mac. Menu is stuck in an "off" state that cannot be toggled back.
# Can be used when bluetooth needs to be disabled for security reasons.
echo "Powering bluetooth off"
sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist "ControllerPowerState" 0
echo "Disabling services"
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.blued.plist'
@Temikus
Temikus / gist:a0b459b41568f37ecefa
Created November 30, 2014 10:49
Kickstart post redirection to see progress
%post
# Change to a vt to see progress
exec < /dev/tty3 > /dev/tty3
chvt 3
# redirect output to ks-post.log including stdout and stderr
(
@Temikus
Temikus / rogue
Last active August 30, 2021 13:46
rogue.awk - Find files that are not accounted for in RPMdb. Usage: awk -f rogue.awk
#!/bin/awk -f
#
# rogue.awk - Find files that are not accounted for
#
# awk -f rogue.awk
#
# Rogue is called from a cron job on an hourly basis.
# It parses files in the filesystem and checks to see
# that they belong to an rpm. Then it prints the
# output of rpm -Va to verify those files that do
#! /bin/bash
#Retrieve the list of devices, an IPA file was built for by parsing the embedded.mobileprovision.
[[ -n "$1" ]] || { echo "Usage: ./check_devs.sh sample.ipa"; exit 0 ; }
LANG=C
IPAFILE=$1
TMPDIR=tmp$$.tmp
mkdir $TMPDIR
unzip -qq $IPAFILE -d $TMPDIR