Skip to content

Instantly share code, notes, and snippets.

Avatar

Mael rgalite

  • France
View GitHub Profile
@rgalite
rgalite / resizeInstanceGroup.js
Created Jun 17, 2020
Auto-replace preemptible VMs
View resizeInstanceGroup.js
const MANAGED_INSTANCE_GROUP_NAME = 'instance-group-2'
const MANAGED_INSTANCE_GROUP_ZONE = 'europe-north1-a'
const MANAGED_INSTANCE_GROUP_TEMPLATE_NAME_ONDEMAND = 'global/instanceTemplates/instance-template-ondemand-vms'
const MANAGED_INSTANCE_GROUP_TEMPLATE_NAME_PREEMTIBLE = 'global/instanceTemplates/instance-template-preemptible-vms-1'
const { auth, Compute } = require('google-auth-library')
const fns = {
resize: async () => {
const client = new Compute()
View authorize.json
{
"team_id": 1234,
"code": "fkkemglogkdkjdekgkflgmp",
"access_token": "logfepvpbozqmdpig"
}
@rgalite
rgalite / i18n.js
Created Aug 4, 2017
Make node accept more locales
View i18n.js
import areIntlLocalesSupported from 'intl-locales-supported'
const localesMyAppSupports = [
'fr',
'en',
]
if (global.Intl) {
// Determine if the built-in `Intl` has the locale data we need.
if (!areIntlLocalesSupported(localesMyAppSupports)) {
@rgalite
rgalite / Gemfile
Created Dec 14, 2012
Deploy with capistrano and unicorn
View Gemfile
group :development do
gem 'capistrano'
gem 'rvm-capistrano'
gem 'capistrano-unicorn', :require => false
end
@rgalite
rgalite / chef_solo_bootstrap.sh
Created Oct 31, 2012 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo with Bitnami Ruby AMI
View chef_solo_bootstrap.sh
#!/usr/bin/env bash
# Set locale to en_US
sudo echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale
echo "export LC_ALL=\"en_US.UTF-8\"" >> /home/bitnami/.bash_profile
export LC_ALL="en_US.UTF-8"
# Fix libstdc++
sudo rm /opt/bitnami/common/lib/libstdc++.so.6 && sudo ln -s /usr/lib/libstdc++.so.6 /opt/bitnami/common/lib/libstdc++.so.6
You can’t perform that action at this time.