Skip to content

Instantly share code, notes, and snippets.

@alces
alces / ansible_local_playbooks.md
Last active June 23, 2025 17:21
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
398 update-ca-trust force-enable
401 update-ca-trust extract
403 openssl s_client -showcerts -connect github.com:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem
405 cp mycertfile.pem /etc/pki/ca-trust/source/anchors/
406 update-ca-trust extract
@jimrubenstein
jimrubenstein / ruleset.xml
Last active April 20, 2018 22:54
Custom PHP Code Sniffer ruleset, uses PSR2 as a base and uses tabs for indenting instead of spaces.
<?xml version="1.0"?>
<ruleset name="CustomCfg">
<description>
PSR2 style guide + tab indent instead of space.
</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
@thomasdarimont
thomasdarimont / readme.md
Last active August 31, 2021 14:13
Use Keycloak as Identity provider for Drupal
# ADICIONANDO MODULOS
# MySQL
./jboss-cli.sh -c --command='module add --name=com.mysql --resources=mysql-connector-java.jar --dependencies=javax.api\,javax.transaction.api';
# ORACLE
./jboss-cli.sh -c --command='module add --name=com.oracle.ojdbc --resources=ojdbc-7.jar --dependencies=javax.api\,javax.transaction.api'
# ADICIONANDO DRIVERS
# MySQL
@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

@subfuzion
subfuzion / curl.md
Last active July 4, 2025 22:06
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active June 19, 2025 05:39
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@kelvearagao
kelvearagao / dateEn.js
Created January 6, 2016 18:15
Função javascript para converter a data do formato brasileiro para formato inglês.
/**
* Recebe um data no formato dd/mm/yyyy e retorna yyyy-mm-dd.
*
* @param string date - Data no formato 'dd/mm/yyyy'.
* @return string - Data no formato 'yyyy-mm-dd'.
*/
function dateToEN(date)
{
return date.split('/').reverse().join('-');
}