Skip to content

Instantly share code, notes, and snippets.

View voidead's full-sized avatar
🏠
Working from home

Balvinder Singh voidead

🏠
Working from home
View GitHub Profile
@voidead
voidead / sublime-text-license.md
Created June 6, 2020 03:56
Sublime Text 3 License keys

Sublime Text 3 License keys

  • Add below line into /etc/hosts
127.0.0.1 sublimetext.com www.sublimetext.com sublimehq.com www.sublimehq.com license.sublimehq.com
  • Use the license key for build 3176
----- BEGIN LICENSE -----
@voidead
voidead / start-stop-ec2-instances.js
Created June 6, 2020 03:45 — forked from eddmann/start-stop-ec2-instances.js
Scheduled Start/Stop of EC2 Instances using Lambda and CloudWatch Events
// Demonstration video can be found at: https://youtu.be/roAerKVfq-Y
// StopEC2Instance
const AWS = require('aws-sdk');
exports.handler = (event, context, callback) => {
const ec2 = new AWS.EC2({ region: event.instanceRegion });
ec2.stopInstances({ InstanceIds: [event.instanceId] }).promise()
@voidead
voidead / Vagrantfile
Created May 30, 2020 15:16 — forked from hodak/Vagrantfile
Add SSH key as authorized key for Vagrant's root
Vagrant.configure(2) do |config|
...
id_rsa_pub = File.read("#{Dir.home}/.ssh/id_rsa.pub")
config.vm.provision "copy ssh public key", type: "shell",
inline: "echo \"#{id_rsa_pub}\" >> /home/vagrant/.ssh/authorized_keys"
end

Keybase proof

I hereby claim:

  • I am voidead on github.
  • I am voidead (https://keybase.io/voidead) on keybase.
  • I have a public key ASDhZQDYFl8qfq2YydF4nJ9wTySyO0zP4bUnTh3FeA3SNwo

To claim this, I am signing this object:

@voidead
voidead / free-memory.rb
Created May 21, 2019 04:22 — forked from vigo/free-memory.rb
"free" command for osx. Shows available memory
#!/usr/bin/env ruby
# encoding: utf-8
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel
# http://vigodome.com | http://ugur.ozyilmazel.com | https://github.com/vigo
def get_paged_memory_usage(match_string, paging=4096)
mvar = 3
if match_string.split(/[^\w]/).length > 1
mvar = 4