Skip to content

Instantly share code, notes, and snippets.

@zeqk
zeqk / docker-compose-node-mongo.yml
Created September 17, 2021 19:00 — forked from wesleybliss/docker-compose-node-mongo.yml
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@zeqk
zeqk / README.md
Created June 10, 2021 20:02 — forked from thomaslarsen/README.md
Convert PEM certificate to JSON format
@zeqk
zeqk / remove_gitlab_artifacts.sh
Created March 6, 2021 03:38 — forked from carceneaux/remove_gitlab_artifacts.sh
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
server {
listen 80;
listen [::]:80;
server_name ~^((?<subdomain>.+)\.)?(?<domain>.+)\.171.11.100.118.xip.io$;
# server_name ~^(?P<ci_build_ref_slug>.+)?(?<domain>.+).171.11.100.118.xip.io$;
add_header Content-Type text/plain;
if ($subdomain = hola) {
return 200 'chau $subdomain $domain';

Copy

cp -avr /home/src /home/dest

Eliminar carpeta recursivamente

rm -r /folder
@zeqk
zeqk / xmlhttp-example.asp
Created October 13, 2020 19:32
Classic ASP xmlhttp example
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html>
<%
'----------
' This is an example of an old script I used to use to pull data from an internal web server
' and render it on a public-facing website.
'----------
Function getBBstatus()
Dim xmlhttp
Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.setTimeouts 30,500,1000,1000
@zeqk
zeqk / Get-Totals.ps1
Last active October 5, 2020 03:54
Script para obtener los totales a partir de los PDF del S-21 Modo de uso ```powershell .\Get-Totals.ps1 2021 09 ```
function Install-Nuget {
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = "$PSScriptRoot\nuget.exe"
If( -Not (Test-Path $targetNugetExe)){
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
}
}
@zeqk
zeqk / group_vars
Created August 14, 2020 19:06 — forked from charypar/group_vars
Deploying SSL keys securely with Ansible (code)
---
ssl_certificates:
- certificate_src: secure.example.com.pem
certificate_dest: /etc/ssl/certs/secure.example.com.pem
key_src: secure.example.com.protected.key
key_dest: /etc/ssl/private/secure.example.com.protected.key
key_stripped: /etc/ssl/private/secure_example.com.key
key_password: "{{ssl_passphrase}}"
@zeqk
zeqk / delete_git_submodule.md
Created May 12, 2020 21:55 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule