Skip to content

Instantly share code, notes, and snippets.

Helder Rossa kimus

Block or report user

Report or block kimus

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
@kimus
kimus / create-instance.sh
Last active Jan 18, 2019
Tomcat Instances and Hot Reload Nginx
View create-instance.sh
#!/bin/bash
if [ $# -eq 0 ]
then
echo "No release number version provided. Please give a release number (i.e: 1.4.9 or 1.4)"
echo "Syntax:"
echo " $0 VERSION"
exit -1
fi
@kimus
kimus / gitlab-collaborator.diff
Created Nov 23, 2015
Added Collaborator role to GitLab instance
View gitlab-collaborator.diff
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 38bc208..bd21b82 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -83,6 +83,9 @@ class Ability
elsif team.developer?(user)
rules.push(*project_dev_rules)
+ elsif team.collaborator?(user)
+ rules.push(*project_collab_rules)
View monit-alert-email
set alert usera@example.com
set mailserver smtp.gmail.com port 587
username "user@gmail.com"
password "password"
using TLSV1
with timeout 30 seconds
set mail-format {
from: monit@server.example.com
@kimus
kimus / fix-google-photos-icons.sh
Created May 29, 2015
Fix Google Photos Backup icons on Mac OS X Yosemite dark menu bar
View fix-google-photos-icons.sh
#!/bin/bash
# REQUIREMENTS:
# brew install imagemagick
#
function switch_files {
mv $1.png $1-original.png
convert -negate $1-original.png $1.png
}
@kimus
kimus / server_confs.md
Last active Apr 4, 2016
Server Configurations
View server_confs.md

Server Configurations

NGINX

server {
  server_name .example.com;
  root /srv/example.com/htdocs;
}
@kimus
kimus / cx_oracle.md
Last active Sep 12, 2019
Installing python cx_oracle on Ubuntu
View cx_oracle.md

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@kimus
kimus / ufw.md
Created Mar 2, 2014
NAT and FORWARD with Ubuntu’s ufw firewall
View ufw.md

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@kimus
kimus / XenServer-Notes.md
Last active Aug 29, 2015
XenServer Notes
View XenServer-Notes.md

Citrix Xenserver

Citrix Xenserver is a beautiful open source (from 6.2 edition and later) hypervisor that tries to grab as much as possible market share on virtualization/cloud world. It carries many years of development efforts by Citrix, many well established implementations and a broad support community. XenMotion, High Availability and all the great features of Xenserver are available on the licensed and unlicensed versions of the hypervisor.

Applying Hotfixes

The licensed version includes automated patches and updates through XenCenter console and 24×7 Citrix Technical Support. On the unlicensed version, the administrator should apply the xenserver patches by himself through an ssh console. XenCenter still notifies the availability of new patches.

So, on XenCenter when you goto Tools – Install Updates, you get grayed out options. To manually apply the updates, first of all we should download the new patches from Citrix webserver, XenCenter will help you to do so. Then unzip the contents of

@kimus
kimus / README.md
Created Oct 24, 2013
How to use PAYMILL with Squarespace
View README.md

How to use PAYMILL with Squarespace

What follows is not a step-by-step guide for using PAYMILL. You will need a some knowledge of Javascript (inc. jQuery), a bit of PHP and preferably some experience with cross domain requests. Additionally, you will have to upload files to Heroku, which requires Git and terminal commands, or any other service that you can host the PHP files.

Let's look at a brief overview of the process:

  • The User fills in their credit card details in their browser;
  • The PAYMILL JS library generates a token on PAYMILL's servers and hands it back to the browser;
  • The browser sends this token to our own server;
  • Our server uses the PAYMILL server-side library to submit the charge to PAYMILL;
@kimus
kimus / insert_uuid.py
Created Oct 23, 2013
Plugin to Insert a UUID in Sublime Text
View insert_uuid.py
import sublime_plugin
import uuid
class InsertUuidCommand(sublime_plugin.TextCommand):
def run(self, edit):
u = uuid.uuid4()
for r in self.view.sel():
self.view.replace(edit, r, u.__str__())
def description(self):
You can’t perform that action at this time.