Skip to content

Instantly share code, notes, and snippets.

View lupupitkanen's full-sized avatar

Lupu Pitkänen lupupitkanen

View GitHub Profile
@klaasnotfound
klaasnotfound / jekyll-multiple-languages-plugin.rb
Last active May 27, 2019 09:40
This is a modified version of the most popular Jekyll i18n plugin. It puts the default language in its own subfolder (like the other languages), uses a base.html file as the central index.html (for language-based redirects) and properly translates custom collection documents and links.
=begin
Jekyll Multiple Languages is an internationalization plugin for Jekyll. It
compiles your Jekyll site for one or more languages with a similar approach as
Rails does. The different sites will be stored in sub folders with the same name
as the language it contains.
Please visit https://github.com/screeninteraction/jekyll-multiple-languages-plugin
for more details.
@stetic
stetic / google-cloud-storage-upload-download.php
Last active September 25, 2023 19:20
PHP Example for Google Storage Upload and Download with Google APIs Client Library for PHP
<?php
/*
* PHP Example for Google Storage Up- and Download
* with Google APIs Client Library for PHP:
* https://github.com/google/google-api-php-client
*/
include( "Google/Client.php" );
include( "Google/Service/Storage.php" );
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active April 3, 2024 13:55
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@AidanThreadgold
AidanThreadgold / google-cloud-storage-upload.php
Created April 5, 2014 20:25
Upload a file to google cloud
<?php
require_once("src/Google/Client.php");
require_once("src/Google/Service/Storage.php");
/**
* Connect to Google Cloud Storage API
*/
$client = new Google_Client();
$client->setApplicationName("App Name");