I hereby claim:
- I am trestoa on github.
- I am klein (https://keybase.io/klein) on keybase.
- I have a public key whose fingerprint is 0500 B18E 041D FA70 05E9 7E1D E7F2 AE69 1B24 B13E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import mysql.connector | |
def get_connection(): | |
return mysql.connector.connect(user='USERNAME', password='PASSWORD', database='DATABASE', host='HOST') | |
def setup(): | |
con = get_connection() | |
cursor = con.cursor() | |
cursor.execute("DROP TABLE IF EXISTS users") |
#include <kovan/kovan.h> | |
void wait_for_light_save(int light_port_) | |
{ | |
int xBut, l_on_, l_off_, l_mid_, OK = 0; | |
xBut = get_extra_buttons_visible(); | |
set_extra_buttons_visible(0); | |
set_a_button_text("-"); | |
set_c_button_text("-"); | |
set_analog_pullup(light_port_, 1); |
IP="1.2.3.4" | |
JAR_NAME="myjar.jar" | |
WRAPPER_NAME="wrapper.c" | |
PROJECT_NAME="myproject" | |
#Upload the wrapper and the jar | |
scp JAR_NAME root@$IP:/kovan/lib/$PROJECT_NAME/ | |
scp WRAPPER_NAME root@$IP:/kovan/bin/$PROJECT_NAME/ | |
#Compile the wrapper | |
ssh root@$IP "cd /usr/bin/$PROJECT_NAME; gcc -o PROJECT_NAME $WRAPPER_NAME, rm WRAPPER_NAME" |
#include <stdlib.h> | |
#define CLASS_LOCATION LOCATION | |
#define CLASS_NAME NAME | |
int main() { | |
system("export BOOTCLASSPATH=\"/usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip:/usr/share/classpath/tools.zip:/usr/lib/linkjvmjava.jar\"; export CLASSPATH=\"/usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip:/usr/share/classpath/tools.zip:/usr/lib/linkjvmjava.jar:.\"; export LD_LIBRARY_PATH=\"/usr/lib/classpath:/usr/lib\"; cd CLASS_LOCATION; java CLASS_NAME"); | |
return 0; | |
} |
read -p "Please enter the files to upload: " files | |
read -p "Please enter the files to compile: " files_compile | |
read -p "Enter the Remote-Directory: " directory | |
read -p "Enter link´s IP-Address: " ip | |
read -p "Enter the Out-File: " out | |
scp $files root@$ip:$directory | |
ssh root@$ip "cd $directory; c++ $files_compile /usr/lib/libkovan.so -o $out" |