Skip to content

Instantly share code, notes, and snippets.

Code wins arguments!

Andres Vargas zodman

Code wins arguments!
View GitHub Profile
zodman / store-secrets-githubactions .py
Created Oct 30, 2020
store github secrets from env enviroment
View store-secrets-githubactions .py
import sys
from dotenv import dotenv_values
# pip install python-dotenv
# using .secretsenv org repo | bash
def main():
e =dotenv_values(dotenv_path=sys.argv[1])
zodman / bluetooth.ps1
Last active Aug 15, 2020
Enable and disable bluetooth windows by powershell cli ! usefull to sync you airphones
View bluetooth.ps1
[CmdletBinding()] Param (
[Parameter(Mandatory=$true)][ValidateSet('Off', 'On')][string]$BluetoothStatus
If ((Get-Service bthserv).Status -eq 'Stopped') { Start-Service bthserv }
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
zodman /
Created Jun 6, 2020 — forked from GochoMugo/
Node.js Debug Package as a Dev-Dependency

The [debug][debug] module for Node.js is one of the most useful utilities when it comes to high-level debugging. The only problem with using it, would that the module eventually becomes a hard dependency in your project. Your project will NOT run if the package is not installed despite the fact that it is only needed in development mode.

One way to work around this to have a dummy function used in place of the real debug function, when users are in production mode.

var debug = process.env.DEBUG ? require("debug")("MyProject:Server") : function() {};

This way, the module is only loaded when the DEBUG environment variable is set. Therefore, the package can be added as a devDependency to the project's package.json rather than as a dependency.

zodman / featureflag.js
Created Feb 26, 2020
Simple featureflag in nodejs
View featureflag.js
* Simple featureFlag
* */
const YAML = require('yaml');
const fs = require("fs");
class FeatureFlag {
constructor() {
View cors.conf
set $var_cors 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-app-language,X-app-version,X-app-countr';
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-app-language,X-app-version,X-app-country';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
View my IA
title tags description
my IA Challenge
django, keras
View the slide with "Slide Mode".

Andres Bernardo Vargas Rodriguez

# This bash script use the Bamboo REST API in order to trigger a plan tests and wait for it to finish and get a result (failed or success).
# It should have a timeoput and should return success or failure
#This triggers the plan
#set -x
EXECUTEPLAN=$(curl -H "Authorization: Bearer ${bamboo.BEARER_SECRET}" -X POST -d "stage&executeAllStages"
echo "output of plan: "
import requests
import argparse
import os
import time
import pprint
import sys
base_token = os.environ.get("bamboo_BAMBOO_TOKEN")
TOKEN = os.environ.get("BAMBOO_TOKEN", base_token)
zodman /
Created Oct 3, 2019
small script to fetch all canadian companies who issued LMIA
mport rows
from collections import OrderedDict
from rows import fields, Table
import tqdm
files = [
zodman /
Last active Aug 22, 2019 — forked from miratcan/
A python script to run hackerrank answers on your local. Just run it in the sample test cases folder that you downloaded from hackerrank.
import re
import glob
import subprocess
from os.path import exists
from sys import exit
INPUT_FOLDER = 'input/'
OUTPUT_FOLDER = 'output/'