Skip to content

Instantly share code, notes, and snippets.

View Andrei-Pozolotin's full-sized avatar

Andrei Pozolotin Andrei-Pozolotin

View GitHub Profile
@Andrei-Pozolotin
Andrei-Pozolotin / gist:820bf7c357ab0b8b5af4
Last active August 29, 2015 14:06
play 3.0: a better dev/prod/test separation
grep -E -H -i "(mode.prod)|(mode.dev)|(mode.test)" . -R | wc -l
82
package design;
import java.lang.invoke.CallSite;
import java.lang.invoke.LambdaMetafactory;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
package design;
import java.lang.invoke.CallSite;
import java.lang.invoke.LambdaMetafactory;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
package design;
import java.lang.invoke.CallSite;
import java.lang.invoke.LambdaMetafactory;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@Andrei-Pozolotin
Andrei-Pozolotin / activate.sh
Last active November 7, 2021 07:33
ubuntu 14.04 cryptsetup luks suspend/resume root partition
#!/bin/bash
#
# ubuntu 14.04 cryptsetup luks suspend/resume root partition sleep activation
#
source=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # install script folder
target=/run/pm-crypto # chroot environment folder
bind_list="/dev /proc /sys /run" # special system mounts
@Andrei-Pozolotin
Andrei-Pozolotin / maven-scala-js.md
Last active January 26, 2021 09:38
maven scala js
@Andrei-Pozolotin
Andrei-Pozolotin / ubuntu_ami_ids.sh
Created May 11, 2016 17:53 — forked from goura/ubuntu_ami_ids.sh
Get a list of AMI IDs for a specific Ubuntu version
#/bin/sh
curl https://cloud-images.ubuntu.com/locator/ec2/releasesTable | jsonlint -Sf | jq '[.aaData[]|select(.[1]=="trusty" and .[3]=="amd64" and .[4]=="hvm:instance-store")|{region:.[0], ami_id:(.[6]|sub("<a [^<]+>"; "")|sub("</a>"; ""))}]'
@Andrei-Pozolotin
Andrei-Pozolotin / a-cni-bash-plugin
Last active October 2, 2020 04:40
cni-bash-plugin
cni-bash-plugin
files:
/etc/rkt/net.d/bridge.sh.conf
/etc/rkt/net.d/bridge-dhcp.sh
/etc/rkt/net.d/bridge.sh
usage:
rkt run \
--insecure-options=all \
see:
https://github.com/appc/acbuild/issues/235
@Andrei-Pozolotin
Andrei-Pozolotin / java-signals-test.sh
Created November 21, 2016 18:08 — forked from nicoulaj/java-signals-test.sh
What signals can your JRE handle ?
#!/bin/bash
# Get temp dir
tmpdir=$(mktemp -d)
# Generate test
cat > ${tmpdir}/ListenToSignal.java <<EOF
import sun.misc.Signal;
import sun.misc.SignalHandler;
public class ListenToSignal {