Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Svanefalk csvan

View GitHub Profile
@gerbsen
gerbsen / ssh_agent_start.fish
Last active Nov 16, 2020 — forked from schaary/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
View ssh_agent_start.fish
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
@justinmc
justinmc / anchor_smooth_scroll.js
Last active May 14, 2019
Anchor Smooth Scroll - Angular Directive
View anchor_smooth_scroll.js
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Anchor Smooth Scroll - Smooth scroll to the given anchor on click
* adapted from this stackoverflow answer: http://stackoverflow.com/a/21918502/257494
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
angular.module('yourapp').directive('anchorSmoothScroll', function($location) {
'use strict';
return {
restrict: 'A',
replace: false,
@thomasfr
thomasfr / iptables.sh
Last active Oct 29, 2020
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
View iptables.sh
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers
@mschmulen
mschmulen / README.md
Last active Jul 17, 2017 — forked from anonymous/README.md
LoopBack cheat sheet. git clone https://gist.github.com/6740321.git LoopBackCheatSheet
View README.md

#LoopBack cheat sheet

##Recipies

LoopBack from api-example

Instantiate the sls-sample-app

slc example
cd sls-sample-app
slc install
You can’t perform that action at this time.