Skip to content

Instantly share code, notes, and snippets.

@edwardrf
edwardrf / gettg.go
Created April 5, 2024 04:41
Getting ALB arn from TargetGroup Arn
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/aws/aws-sdk-go-v2/config"
elbv2 "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2"
#!/bin/bash
# Start capture
N=40
SKIPF=15
SKIPE=15
echo $N $(($N-$SKIPF))
mplayer tv:// -tv driver=v4l2:device=/dev/video1:width=1920:height=1080 -frames $N -vo jpeg:outdir=1 &
mplayer tv:// -tv driver=v4l2:device=/dev/video2:width=1920:height=1080 -frames $N -vo jpeg:outdir=2 &
wait
@edwardrf
edwardrf / q03
Last active April 8, 2016 05:16
"use strict";
q03(4);
function q03(n) {
let arr = new Array(n * 2);
fit(n);
function fit(v) {
http://stackoverflow.com/questions/392022/best-way-to-kill-all-child-processes/15139734#15139734
@edwardrf
edwardrf / gist:a7e8c170571730312d2e
Last active March 31, 2021 05:53
xmodmap config to map caps_lock to mode_switch and map mode_switch + ijkl to up left down right
#!/bin/bash
xmodmap -e "clear lock"
xmodmap -e "keysym Caps_Lock = Mode_switch Mode_switch"
xmodmap -e "keysym i = i I Up Up"
xmodmap -e "keysym k = k K Down Down"
xmodmap -e "keysym j = j J Left Left"
xmodmap -e "keysym l = l L Right Right"
xmodmap -e "keysym u = u U Home Home"
xmodmap -e "keysym o = o O End End"
xmodmap -e "keysym u = y Y Prior Prior"
@edwardrf
edwardrf / test.html
Last active December 21, 2015 14:19
Simple showcase of Jquery ajax call
<html>
<head><title>Test Ajax</title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(function(){
$('.run').click(function(){
var buf = [
['0','0','0','0','0','0','0','0'],