Skip to content

Instantly share code, notes, and snippets.

@sukharevd
sukharevd / wildfly-install.sh
Last active October 21, 2023 11:56
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@plentz
plentz / nginx.conf
Last active June 27, 2024 21:05
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@angrykoala
angrykoala / hasselhoffinator.sh
Last active July 11, 2017 10:16
hasselhoffinator
#!/bin/bash
#hasselhoff attack taken to a new level
#@angrykoala
DIR=/home/$(whoami)/hasselhoff.jpg
MESSAGE="you have been hasselhoffed"
IMAGE_URL=http://www.ljpaez.es/imagen/hasselhoff.jpg
wget $IMAGE_URL -q
mv ./hasselhoff.jpg $DIR
gsettings set org.gnome.desktop.background picture-uri file://$DIR
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ololobus
ololobus / create-and-fill-up-table.sql
Last active May 21, 2024 10:58
Create large ~1 GB random dataset in PostgreSQL
CREATE TABLE large_test (num1 bigint, num2 double precision, num3 double precision);
INSERT INTO large_test (num1, num2, num3)
SELECT round(random()*10), random(), random()*142
FROM generate_series(1, 20000000) s(i);
EXPLAIN (analyse, buffers)
SELECT num1, avg(num3) as num3_avg, sum(num2) as num2_sum
FROM large_test
GROUP BY num1;
@agarciamontoro
agarciamontoro / UGRApp.md
Last active September 28, 2017 12:33
UGRApp: propuestas de mejora y solicitud de información

UGRApp: propuestas de mejora y solicitud de información

Introducción

La Universidad de Granada (UGR) lleva unos meses publicitando su nueva aplicación oficial: la UGRApp. Esta aplicación permite el acceso a la Tarjeta Universitaria Inteligente (TUI) en su versión digital, consulta de las calificaciones, el listado de asignaturas, los horarios de clases, el menú de los comedores universitarios, el catálogo de la biblioteca, realizar trámites administrativos... En definitiva, pretende funcionar como intermediaria entre el alumnado y la Universidad.

Tras los primeros anuncios de la aplicación por parte de la UGR, un grupo de miembros de la comunidad universitaria granadina decidió analizar la aplicación para verificar que era segura. En este primer análisis se detectaron varios problemas. Tras debatir los pasos a seguir para frenar los peligros que esta aplicación crea, y después de estar en contacto con D. José Ángel Ibáñez Zapata ---Director de Comunicación de la UGR---, que se ofreció como intermediar

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active June 18, 2024 07:51
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@diyfr
diyfr / docker-compose.yml
Last active May 1, 2023 05:34
Basic secured configuration for Traefik V2.X
version: '3.5'
services:
proxy:
image: traefik:v2.1
# The official v2.0 Traefik docker image
container_name: proxy
networks:
- traefik
ports: