Skip to content

Instantly share code, notes, and snippets.

Joao Gilberto Magalhães byjg

Block or report user

Report or block byjg

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
#!/usr/bin/env python
""" Print all of the clone-urls for a GitHub organization.
It requires the pygithub3 module, which you can install like this:
$ sudo yum -y install python-virtualenv
$ mkdir scratch
$ cd scratch
$ virtualenv my-virtualenv
$ source my-virtualenv/bin/activate
View SMS.vba
Sub SMS()
Dim Result As String
Result = EnviarSMS("21", "999999999", "Mensagem", "Usuario", "Senha")
MsgBox Result
End Sub
Function RequestURL(Method As String, Dict As Variant) As String
Dim QueryString As String
Dim Key As Variant
byjg / run.groovy
Created May 12, 2018
Run Shell Script from Groovy
View run.groovy
// Parameters
def cmd = "ls -la"
def workdir = "/home/"
// Code
def sout = new StringBuilder(), serr = new StringBuilder()
def proc = cmd.execute(null, new File(workdir))
proc.consumeProcessOutput(sout, serr)
println "out> $sout err> $serr"
byjg /
Created Apr 12, 2018 — forked from andreicristianpetcu/
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file


First one found from of

byjg / NoVNC_Paste.js
Last active Oct 14, 2019
How to Paste code to NoVNC.
View NoVNC_Paste.js
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
View audima-player.html
<!-- Start Audima Widget Injection -->
<div id="audimaWidget"></div>
<script src="//"></script>
<!-- End Audima Widget Injection -->
<!-- Audima CSS Customization -->
#audimaWidget .audima-panel {
/* Insira aqui a customização exemplo:
background-color: silver;
View teste_hook_wp_meta.php
function add_meta_tags()
global $data;
if(!is_null($data['metas']['page_meta_description']) )
echo '<meta name="description" content="'.$data['metas']['page_meta_description'].'">';
add_action('wp_head', 'add_meta_tags');
byjg / default
Last active May 18, 2016
Default NGINX Setup
View default
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
View special-quote.php
$string = "This is a example with special “quotes” and ‘single quotes’";
echo $string . "\n";
echo fixcurly($string) . "\n";
function fixcurly($string)
You can’t perform that action at this time.