Skip to content

Instantly share code, notes, and snippets.

View ecanuto's full-sized avatar

Everaldo Canuto ecanuto

  • Sao Paulo - Brasil
View GitHub Profile
@ecanuto
ecanuto / README-setup-tunnel-as-systemd-service.md
Created November 28, 2020 12:53 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
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/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target

Keybase proof

I hereby claim:

  • I am ecanuto on github.
  • I am ecanuto (https://keybase.io/ecanuto) on keybase.
  • I have a public key ASCmPS7fz27cHimzThFNdf5AlJkGnGkKjkB8bJbaAtMyRQo

To claim this, I am signing this object:

@ecanuto
ecanuto / class-property.cs
Created April 16, 2018 10:01
Class property in C#
public class User {
private String name;
public string Name
{
get { return name; }
set { name = value; }
}
}
@ecanuto
ecanuto / class-property.java
Created April 16, 2018 09:59
Java class property
public class User {
private String name;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@ecanuto
ecanuto / parse_json_post.go
Created August 24, 2017 14:31 — forked from andreagrandi/parse_json_post.go
Parse a JSON http POST in GoLang
package main
import (
"encoding/json"
"fmt"
"net/http"
)
type test_struct struct {
Test string
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz
tar -xf linux-4.4.tar.xz
cd linux-4.4
wget -O .config https://git.archlinux.org/svntogit/packages.git/plain/trunk/config.x86_64?h=packages/linux-lts
time make -j1 bzImage
@ecanuto
ecanuto / README.md
Created June 20, 2016 00:15 — forked from johnpbloch/README.md
A bash script to make .pot files for WordPress plugins

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"

@ecanuto
ecanuto / wordpress-plugin-svn-to-git.md
Created June 17, 2016 22:45 — forked from kasparsd/wordpress-plugin-svn-to-git.md
Using Git with Subversion Mirroring for WordPress Plugin Development
@ecanuto
ecanuto / Install Cloud9 on local or remote computer, server, or raspberry pi This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
@ecanuto
ecanuto / displayres.swift
Last active September 17, 2015 03:48 — forked from wmarbut/displayres.swift
Get all available display resolutions on your machine
//
// main.swift
// Created by grep-awesome on 6/15/15.
//
import Foundation
import CoreGraphics
var displayConfig: CGDisplayConfigRef = nil
let mainDisplayID = CGMainDisplayID()