Skip to content

Instantly share code, notes, and snippets.

🤗
Code wins arguments!

Andres Vargas zodman

🤗
Code wins arguments!
Block or report user

Report or block zodman

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
@zodman
zodman / hrtool.py
Last active Aug 22, 2019 — forked from miratcan/hrtool.py
A python script to run hackerrank answers on your local. Just run it in the sample test cases folder that you downloaded from hackerrank.
View hrtool.py
import re
import glob
import subprocess
from os.path import exists
from sys import exit
INPUT_FOLDER = 'input/'
OUTPUT_FOLDER = 'output/'
@zodman
zodman / calc.py
Created May 23, 2019
calculate days
View calc.py
import sys
import humanize
hrs = int(sys.argv[1])
days = round(hrs/8.0,1)
weeks = round(hrs/40.0,1)
month= round(days/20.0,1)
print("total days: {}".format( humanize.fractional(days)))
print("total weeks: {}".format(humanize.fractional(weeks)))
@zodman
zodman / gist:c81f343d01435388d9264aa14fa5d638
Created Feb 8, 2019 — forked from sdoro/gist:4291961
restart OpenVPN server in CLI pfsense
View gist:c81f343d01435388d9264aa14fa5d638
echo "<?php include('openvpn.inc'); openvpn_resync_all();?>" | php -q
@zodman
zodman / Steps to Obtain Client Secret.md
Created Oct 4, 2018 — forked from darthShadow/Steps to Obtain Client Secret.md
Mega Account Creator. Handles registration using megareg. Handles verification using Google Client API.
View Steps to Obtain Client Secret.md
  1. Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
  2. On the Add credentials to your project page, click the Cancel button.
  3. At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name (Mega Account Creator) if not already set, and click the Save button.
  4. Select the Credentials tab, click the Create credentials button and select OAuth client ID.
  5. Select the application type Other, enter the name "Mega Account Creator", and click the Create button.
  6. Click OK to dismiss the resulting dialog.
  7. Click the Download JSON button to the right of the client ID.
  8. Move this file to your working directory and rename it client_secret.json.
@zodman
zodman / rundeck.py
Last active Sep 18, 2018
rundeck tail log and project status
View rundeck.py
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
import logging
import os
import requests
import colorama
try:
View gist:cbcbd90333adc010fc86767b287fe689

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@zodman
zodman / VideoStream.php
Created Jan 22, 2018 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
View VideoStream.php
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
View gist:e52820e22f113fe72771af7fe45b1ab5
$ cat docker_delete_all.bash
docker ps -a | awk '{print $1}' | xargs docker rm
docker images | awk '{print $1}' | xargs docker rmi
@zodman
zodman / app.js
Created Aug 28, 2017 — forked from taiansu/app.js
Phoenix brunch config which just make sense
View app.js
import "phoenix_html"
import "bootstrap"
import "jquery"
import "toastr"
// ...
@zodman
zodman / 0_reuse_code.js
Created Aug 17, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.