Skip to content

Instantly share code, notes, and snippets.

View LuisHCK's full-sized avatar
🏠
Working from home

Luis J. Centeno LuisHCK

🏠
Working from home
View GitHub Profile
#!/bin/bash
#TS3 Server crack install script
#Written by: Supervisor for www.r4p3.net
#Configuration settings. Change those to your needs or leave them as provided for standart use.
timeout="5" #Timeout for update check in s
COLOR1='\033[0;32m' #green color
COLOR2='\033[0;31m' #red color
NC='\033[0m' #no color
check_for_updates="1" #put 1=YES or 0=NO to check for updates
Private Sub rpcAbrirPuerto()
Try
If SerialPort1.IsOpen Then
SerialPort1.Close()
End If
With SerialPort1
.PortName = "COM1"
.BaudRate = 9600
.Parity = IO.Ports.Parity.None
.DataBits = 8
You can install redesigned version elementary tweaks on Loki.
sudo apt install software-properties-common &&
sudo add-apt-repository ppa:philip.scott/elementary-tweaks &&
sudo apt update &&
sudo apt install elementary-tweaks
@LuisHCK
LuisHCK / addi
Last active March 29, 2017 23:33
Automatic DEB Downloader & Installer. Use this simple script to automatically download a .deb file from a url and install it. )Example: './addi https://webserver/file.deb'
#!/bin/bash
<<'end_long_comment'
Copyright 2017 Luis J. Centeno - [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@LuisHCK
LuisHCK / simple_form_mdl_wrappers.rb
Created January 15, 2017 21:28 — forked from anonymous/simple_form_mdl_wrappers.rb
Material Design Lite wrappers for Simple Form
# Simple wrappers for Material Design Lite text fields to use with SimpleForm (Rails)
SimpleForm.setup do |config|
config.wrappers :mdl_field, tag: 'div', class: 'mdl-textfield mdl-js-textfield', error_class: 'mdl-textfield__error' do |b|
b.use :html5
b.use :input, class: 'mdl-textfield__input'
b.use :label, class: 'mdl-textfield__label'
end
<!-- facebook Open Graph Metadatas -->
<meta content="your_facebook_app_id" property="fb:app_id">
<meta content="{{ site.title }}" property="og:site_name">
{% if page.title %}
<meta content="{{ page.title }}" property="og:title">
{% else %}
<meta content="{{ site.title }}" property="og:title">
{% endif %}
{% if page.title %}
<meta content="article" property="og:type">
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:[email protected]
X-WR-TIMEZONE:America/Managua
BEGIN:VTIMEZONE
TZID:America/Managua
X-LIC-LOCATION:America/Managua
@LuisHCK
LuisHCK / installenv
Created May 11, 2017 15:59
LuisHCK's automatic enviroment installer
#!/bin/bash
echo " $(tput setaf 2)Welcome to LuisHCK's automatic enviroment installer"
echo "Updating system"
sudo apt-get update
sudo apt-get -y upgrade
echo "================================================"
echo "Get ADDI"
wget -o ~/addi https://gist.githubusercontent.com/LuisHCK/023fcef876e14f823e758b9774f67d62/raw/accec4053c88a43b618367c0dfac58963994e3c3/addi
sudo cp /etc/network/interfaces /etc/network/interfacesoriginal
sudp rm /etc/network/interfaces
sudo nano /etc/network/interfaces
----------------------------------
COPY
----------------------------------
auto lo
iface lo inet loopback
auto eth0
@LuisHCK
LuisHCK / TablaFrecuencias.java
Created July 28, 2017 19:21
Crear una tabla de frecuencias mediante a partir de un string. Uso => 1,2,3,4,5...n
package main;
import java.util.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
public class EntradaDatos {