Skip to content

Instantly share code, notes, and snippets.

View gforien's full-sized avatar

Gabriel Forien gforien

  • INSA Lyon
  • Lyon, France
  • 14:13 (UTC +02:00)
View GitHub Profile
@tomdaley92
tomdaley92 / rsub_setup.md
Last active July 19, 2021 11:16
Installing and configuring rsub for editing files with sublime through ssh
  1. Install rmate on the remote server
sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate && sudo chmod a+rx /usr/local/bin/rsub
  1. Modify your ~/.ssh/config file on your local machine
Host *
#you have to put this in $profile or $profile.currentuserallhosts
$esc = [char]27
if($env:WT_SESSION){
$prevprompt = $Function:prompt
function prompt {
if ($pwd.provider.name -eq "FileSystem") {
$p = $pwd.ProviderPath
Write-host "$esc]9;9;`"$p`"$esc\" -NoNewline
}
@kristopherjohnson
kristopherjohnson / mycontent.html
Created June 1, 2012 13:48
Web page with dynamic loading and conversion of Markdown to HTML
<!DOCTYPE html>
<html>
<head>
<title>My Markdown Content</title>
<meta name="viewport" content="width=device-width" >
<style>
#status {
@noahcoad
noahcoad / json2yaml.py
Last active November 3, 2023 11:40
Python to convert json to yaml
#!/usr/bin/env python3
# convert json to yaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# python3 json2yaml.py < ~/code/manpow/moneybug/mbuploader/support/offices.json
# gist https://gist.github.com/noahcoad/46909253a5891af3699580b8f17baba8
import yaml, json, sys
sys.stdout.write(yaml.dump(json.load(sys.stdin)))
@kharandziuk
kharandziuk / terraform-presigned-url.tf
Created June 25, 2020 11:50
A hack to generate a presigned url in terraform
variable "bucket_name" {
default = "max-bucket-for-testing"
}
provider "aws" {
region = var.aws_region
profile = var.aws_profile
}
resource "aws_s3_bucket" "artifacts" {
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active January 17, 2024 22:44 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@tsohr
tsohr / gist:5711945
Created June 5, 2013 06:15
Android activity manager "am" command help
adb shell am
usage: am [subcommand] [options]
usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--R COUNT] [-S] [--opengl-trace] <INTENT>
am startservice <INTENT>
am force-stop <PACKAGE>
am kill <PACKAGE>
am kill-all
am broadcast <INTENT>
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active March 8, 2024 17:34
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@mgoodness
mgoodness / k8s-svc-annotations.md
Last active March 11, 2024 16:24
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@pauliusef
pauliusef / gist:c7bcc96481fb3113cc78ae1246901e6f
Created August 15, 2017 09:16
Select every second line in Sublime
Search for : (.*(\n|$)){2}
alt+R - to toggle regular expression search
alt+ENTER - to select all results