Skip to content

Instantly share code, notes, and snippets.

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

Emmanuele finferflu

🏠
Working from home
  • Manchester, UK
View GitHub Profile
@ttscoff
ttscoff / tunes.rb
Created February 15, 2020 17:07
CLI controls for Spotify and (Apple) Music
#!/usr/bin/env ruby
# encoding: utf-8
#
# CLI music controller for Spotify and Apple Music
# By default affects whichever one is running, preferring Spotify
# if both are. Change the order of KNOWN_PLAYERS to reverse that.
#
# If the first argument is either "music" or "spotify," it will
# target that app. If the app is not running, it will be launched.
# When no app is specified and neither are running, it returns nothing
@sdemontfort
sdemontfort / rename-parameter-store-values.rb
Last active October 4, 2022 19:00
Rename AWS Parameter Store Values
require 'json'
# Rename parameter store paths. Takes:
# - parameter store json file path
# - old path
# - new path to use
old_path, new_path, _rest = ARGV
params = `aws ssm get-parameters-by-path --path #{old_path} --with-decryption`
params = JSON.parse(params, object_class: OpenStruct)
@pahud
pahud / delete_all_awslogs.sh.md
Last active October 18, 2023 09:13
delete all aws log groups

specify the region

export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do  echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done

only delete loggroup name starting with /aws/lambda

@thornbill
thornbill / .gitlab-ci.yml
Created November 22, 2016 21:29
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
@nahtnam
nahtnam / .gitlab-ci.yml
Created July 4, 2016 07:22
Using Ember CLI on Gitlab CI
image: node:6.2.2
before_script:
- npm config set spin false
- npm install -g bower
- npm install -g ember-cli
- npm install -g phantomjs-prebuilt
- npm install
- bower install --allow-root
@lornajane
lornajane / mac.md
Last active May 21, 2024 10:37
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@gosuri
gosuri / terraformer.go
Created September 4, 2015 18:28
Using terraform with go
package terraformer
import (
"bytes"
"errors"
"path"
"path/filepath"
"...runtime"
"...store"
@feelinc
feelinc / UploadDirS3.py
Last active May 15, 2024 15:02
Upload folder contents to AWS S3
#!/usr/bin/python
import os
import sys
import boto3
# get an access token, local (from) directory, and S3 (to) directory
# from the command-line
local_directory, bucket, destination = sys.argv[1:4]
@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 00:45
Setting Nginx FastCGI response buffer sizes.
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #