Skip to content

Instantly share code, notes, and snippets.

Julius Ehrlich jlis

  • Dresden
Block or report user

Report or block jlis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker_prune.sh
docker system prune -a --volumes
@jlis
jlis / push_to_new_remote.sh
Last active May 3, 2019
Push git branches to a new remote
View push_to_new_remote.sh
#!/usr/bin/env bash
if [ "$1" == "" ]; then
echo "Usage: ./push_to_new_remote.sh <git folder> <name of the new git remote>"
exit 1
fi
if [ "$2" == "" ]; then
echo "Usage: ./push_to_new_remote.sh <git folder> <name of the new git remote>"
exit 1
View vue_turbolinks.js
@jlis
jlis / loading_skeleton.css
Last active Dec 10, 2018
CSS loading animation
View loading_skeleton.css
// https://css-tricks.com/building-skeleton-screens-css-custom-properties/
.loading {
position: relative;
width: 100%;
display: block;
margin: 0 0 10px;
height: 20px;
&--inner {
@jlis
jlis / ps_mem.py
Created Oct 15, 2018
RAM usage per program
View ps_mem.py
#!/usr/bin/env python
# Try to determine how much RAM is currently being used per program.
# Note per _program_, not per process. So for example this script
# will report RAM used by all httpd process together. In detail it reports:
# sum(private RAM for program processes) + sum(Shared RAM for program processes)
# The shared RAM is problematic to calculate, and this script automatically
# selects the most accurate method available for your kernel.
# Licence: LGPLv2
@jlis
jlis / clear_tmp.sh
Last active Feb 20, 2019
Clears /tmp files which are older than 10 days
View clear_tmp.sh
sudo find /tmp -type f -atime +10 -delete
@jlis
jlis / v-cloak.css
Created Jun 8, 2018
vue.js Cloak Fade
View v-cloak.css
[v-cloak] {
display: none!important;
}
.cloak-fade:not([v-cloak]) {
opacity: 0;
-webkit-animation-name: cloak-fade-in;
animation-name: cloak-fade-in;
-webkit-animation-duration: .3s;
animation-duration: .3s;
@jlis
jlis / index.js
Created May 18, 2018
AWS Lambda function to save events from SQS into DynamoDB
View index.js
var AWS = require('aws-sdk');
var sqs = new AWS.SQS({
region: process.env.AWS_REGION
});
var dynamodb = new AWS.DynamoDB();
var REPEAT_THRESHOLD = process.env.REPEAT_THRESHOLD || 20000;
function receiveSQSMessages(callback) {
var params = {
QueueUrl: process.env.TASK_QUEUE_URL,
@jlis
jlis / buildspec.yml
Created May 15, 2018
AWS CodeBuild Deployment via ECS/ECR
View buildspec.yml
version: 0.2
phases:
pre_build:
commands:
- aws --version
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
build:
commands:
@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018
AWS ECS and ECR deployment via Docker and Gitlab CI
View .gitlab-ci.yml
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
You can’t perform that action at this time.