Skip to content

Instantly share code, notes, and snippets.

View luke10x's full-sized avatar

Luke 10X luke10x

View GitHub Profile
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
import sinon from 'sinon';
import { stubConstructor } from 'ts-sinon'
export class Calculator {
sum(exp: string): number;
sum(a: number, b: number): number;
sum(...args: any): number {
const summands = args.length === 1
? args[0].split('+').map((x: string) => parseFloat(x))
: args;
@luke10x
luke10x / GitCommitEmoji.md
Created October 20, 2020 09:33 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@luke10x
luke10x / settings.json
Last active July 24, 2020 09:35
vscodeconfid for screenshare
{
"editor.cursorStyle":"line",
"editor.cursorWidth": 4,
"editor.folding": false,
"editor.fontFamily":"'Fira Mono', 'Noto Mono','Noto Color Emoji', 'Droid Sans Fallback'",
"editor.fontSize": 16,
"editor.quickSuggestions": false,
"editor.quickSuggestionsDelay": 10000, // in 10 sec
"editor.suggest.maxVisibleSuggestions": 5,
"editor.acceptSuggestionOnCommitCharacter": false,
package com.discoverops.roleplay;
import io.jsonwebtoken.Jwts;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
### Flush and Delete Old Settings ...
iptables -X
iptables -F
iptables -t nat -F
### " ALL MYSQL TRAFFIC FROM Y, PORT (3306) TO Z PORT (3306) ...."
# iptables -t nat -A PREROUTING -p tcp -d db-host.com --dport 3306 -j DNAT --to-destination 192.168.5.1:4041
iptables -t nat -A OUTPUT -p tcp -d db-host.com --dport 3306 -j DNAT --to-destination 192.168.5.1:4041
#iptables -A FORWARD -p tcp -d db-host.com --dport 3306 -j ACCEPT
<?php
namespace So\ProphecyTest;
use PHPUnit\Framework\TestCase;
class SimpleRecord {
private $value = 'default-one';
}
class MagicRecord {
public function __get($prop) {
@luke10x
luke10x / autossh.service
Created May 18, 2016 04:06 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@luke10x
luke10x / cast-here.sh
Last active October 31, 2015 23:39
sound travel
#/bin/bash
FIFO=/tmp/recast-fifo
rm $FIFO
mkfifo $FIFO
(while true; do cat $FIFO | pv | nc -u 127.0.0.1 14999; NC_PID_1=$!; done) &
TCP_PULL_PID=$!
(while true; do nc 0.0.0.0 14888 >$FIFO; NC_PID_2=$!; done) &
UDP_PUSH_PID=$!
caption string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %Y-%m-%d %c"
caption always
hardstatus off
shell "bash"
startup_message off
vbell off
altscreen on
attrcolor b ".I"
defbce "on"
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'