Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command prompt |
Ctrl+` | python console |
Ctrl+N | new file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clone and set up remote tracking branch | |
cd somewhere | |
git clone git://github.com/tknerr/cookbooks-motd.git target/dir | |
cd target/dir | |
git checkout -t origin/bills-kitchen-1.0_branch |
This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04 and CentOS 6.4 (and derviatives) and the attribute file is used to support both distros.
This should work on Mac (where I developed it) and any chef-supported Linux that you can get Vagrant onto (Ubuntu/CentOS).
Because I use ChefDK and Test Kitchen, I can largely ignore setting up Vagrant and Berkshelf and can get right to work on writing recipe code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'openssl' | |
require 'tempfile' | |
require 'fog' | |
BUCKET = 'something' | |
ROOT = File.expand_path('..', __FILE__) | |
UNIVERSE = {} |
sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# metadata.rb | |
# This metadata.rb example reads the dependencies from Berksfile.lock. This can | |
# be used to implement the Environment Pattern with Chef Server. | |
# | |
# The Environment Cookbook: | |
# http://blog.vialstudios.com/the-environment-cookbook-pattern/ | |
name 'my_face' | |
# [...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# located at chef_repo/environments/org1-prod.rb | |
require 'deep_merge' | |
name 'org1-prod' | |
description 'Production environment for org1' | |
org1_yml_path = File.expand_path('../common/org1.yml', __FILE__) | |
common = YAML.load_file(org1_yml_path) | |
default_attributes( | |
common['default'].deep_merge!( | |
# declare all you org1-prod specific things here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# Fixes AltGr problems on Hungarian keyboard layouts in Windows | |
# for characters [ (AltGr+F), < (AltGr+M), \ (AltGr+Q) and { (AltGr+B) | |
atom.keymaps.keyBindings = atom.keymaps.keyBindings.filter((binding, i) -> | |
['ctrl-alt-f','ctrl-alt-q','ctrl-alt-b','ctrl-alt-m'].indexOf(binding.keystrokes) == - 1 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader | |
== Shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android Emulator (ARM64) on EC2 - 2022 | |
--------------------------------------- | |
1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64 | |
2. sudo apt update && sudo apt upgrade | |
3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb | |
4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip | |
5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk | |
6. sudo mv android-sdk /opt/ | |
7. mkdir /opt/android-sdk/cmdline-tools/latest | |
8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error) |
OlderNewer