Skip to content

Instantly share code, notes, and snippets.

View ColdFire87's full-sized avatar

Stefan Tertan ColdFire87

View GitHub Profile
@ColdFire87
ColdFire87 / sshtunnel.go
Created March 27, 2017 09:56 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"
(function() {
if (! window.jQuery ) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js'; // you can change this url by latest jQuery version
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(s);
}
}());
@ColdFire87
ColdFire87 / foo.log
Created April 11, 2017 13:21 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@ColdFire87
ColdFire87 / node-and-npm-in-30-seconds.sh
Created April 26, 2017 23:11 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
<!-- for example -->
<img ng-src="{{ flaky.image }}" ng-error="tellServerItsBroken(this)">
@ColdFire87
ColdFire87 / hook_stdout.py
Last active August 17, 2018 16:32
Hook STDOUT writes (this includes the print function) and print a stacktrace to see where the call originated.
import inspect
import sys
def hook_stdout():
"""
Hook STDOUT writes & print stacktrace.
Useful for figuring out where a printed statement comes from.
:return:

Keybase proof

I hereby claim:

  • I am coldfire87 on github.
  • I am stefantertan (https://keybase.io/stefantertan) on keybase.
  • I have a public key ASBTSBbdfJckL54ZAccpObkbwUiWPcH5eVGzHB1SOjGGcwo

To claim this, I am signing this object:

@ColdFire87
ColdFire87 / ec2-get-security-credentials
Created January 18, 2019 16:53 — forked from fgassert/ec2-get-security-credentials
gets iam security credentials from instance metadata and writes them to awscli environment variables and .s3cfg (for s3cmd)
#!/bin/bash
# gets iam security credentials from instance metadata and writes them to
# awscli environment variables and .s3cfg (for s3cmd)
# Usage: ec2-get-security-credentials ROLENAME DEFAULT_REGION
# ROLE=$1
# DEFAULT_REGION=$2
@ColdFire87
ColdFire87 / lifecycle-cheat-sheet.md
Created April 4, 2020 16:54 — forked from HyperBrain/lifecycle-cheat-sheet.md
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@ColdFire87
ColdFire87 / gist:4b54fb68b92fa575c17859804eb7ce4d
Created March 1, 2021 00:15 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: