Skip to content

Instantly share code, notes, and snippets.

View Temikus's full-sized avatar

Artem Yakimenko Temikus

View GitHub Profile
@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 / 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'

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 / 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"
@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 / index.html
Created August 20, 2012 19:48
Webkit sample for tinkering
<!-- WEBKIT SAMPLE -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<style type="text/css">
#box div
{
position: absolute;
@Temikus
Temikus / comparator.sh
Created October 21, 2012 14:25
Simple comparator script for UNIX-like systems. i.e. works on FreeBSD and Mac.
#!/bin/bash
#Parses 1st and 2nd argument as directory paths and compares MD5 sums recursively
#Usage: ./comparator.sh /mount/directory /other_mount/directory
find "$1" -type f | while read filename; do
name="${filename#$1*}"
sum1="$(md5 -q "$1$name")"
sum2="$(md5 -q "$2$name")"
@Temikus
Temikus / launchd_example.plist
Created October 27, 2012 18:55
Generic plist for launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.username.somethingsomething</string>
<key>ProgramArguments</key>
<array>
@Temikus
Temikus / gist:4072762
Created November 14, 2012 15:27
Print out everything between 2 patterns of text.
sed -n '/pattern1/,/pattern2/p'
@Temikus
Temikus / vmware.repo
Last active October 13, 2015 05:58
VMware tools repo file for RHEL/CentOS6.
[vmware-tools]
name=VMware Tools for Red Hat Enterprise Linux $releasever - $basearch
baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/$basearch
enabled=1
gpgcheck=1
gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
#Provides:
#vmware-tools-esx
#vmware-tools-esx-nox