Skip to content

Instantly share code, notes, and snippets.

🤔
🤔

zekro zekroTJA

🤔
🤔
Block or report user

Report or block zekroTJA

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
@zekroTJA
zekroTJA / getHaste.java
Last active Jun 16, 2017
Hastebin upload snippet
View getHaste.java
/**
* Method by StupPlayer (https://github.com/StupPlayer)
* @param data input as string
* @return hastebin paste URL / error message
*/
public static String hastePost(String data) {
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost("https://hastebin.com/documents");
try {
View python3.6-installer.sh
#!/bin/sh
# IF THERE IS A NEWER PYTHON VERSION AVAILABLE, CHANGE VERSION HERE
RELEASE=3.6.2
sudo apt-get install libbz2-dev liblzma-dev libsqlite3-dev libncurses5-dev libgdbm-dev zlib1g-dev libreadline-dev libssl-dev tk-dev
mkdir ~/python3
cd ~/python3
wget https://www.python.org/ftp/python/$RELEASE/Python-$RELEASE.tar.xz
tar xvf Python-$RELEASE.tar.xz
@zekroTJA
zekroTJA / cmd_clear.py
Created Aug 2, 2017
PYTHON DISCORD BOT: #04 - Clear Command
View cmd_clear.py
import discord
import asyncio
async def ex(args, message, client, invoke):
try:
ammount = int(args[0]) + 1 if len(args) > 0 else 2
except:
await client.send_message(message.channel, embed=discord.Embed(color=discord.Color.red(), descrition="Please enter a valid value for message ammount!"))
@zekroTJA
zekroTJA / pibackup.md
Created Aug 3, 2017
A little CMDer script to backup your Raspberry Pi
View pibackup.md

This script requires the program CMDer. Then go to your CMDer installation path (where the CMDer.exe is located) and create there the batch script:

backup.bat

REM Enter here the local path where the script should copy the backup to
SET backuplocation = "E:\Dateien\Raspberry Pi Backup"

SET current=%cd%
SET folder=%time:~0,2%-%time:~3,2%-%time:~6,2%_%date%
@zekroTJA
zekroTJA / classSerializer.java
Created Aug 4, 2017
Little snippet to save and read java initialized classes directly into a file
View classSerializer.java
import java.io*;
/**
* Created by zekro on 24.05.2017 / 09:46
* DiscordBot/commands.chat
* © zekro 2017
*/
public class Serializer implements Serializable {
@zekroTJA
zekroTJA / zekro-code-policy-eng.md
Last active Jan 16, 2018
zekro Devevopment Code Policy
View zekro-code-policy-eng.md

RELOCATED AND OUTDATED

NEW LOCATION HERE


zekro Development Code Policy (English)

Policy v.1.2.2   -   Last edited: 31.12.2017


@zekroTJA
zekroTJA / 1 - firstthingsfirst.md
Last active Feb 1, 2018
Python Google Spreadsheet API - Tutorial
View 1 - firstthingsfirst.md

Console commands

Windows (CMDer):

λ pip install oauth2client gspread

Linux:

$ sudo pip install oauth2client gspread
@zekroTJA
zekroTJA / atom-config.md
Created Aug 29, 2017
This is a document how I've configured and extended my Atom Editor.
View atom-config.md

This is a document how I've configured and extended my Atom Editor.
Last updated: 08/29/2017


Theme:

UI Theme:     Atom Material
Syntax Theme:     One Dark

@zekroTJA
zekroTJA / discord-py-permission-system.md
Last active Jun 12, 2019
discord.py - Permission system
View discord-py-permission-system.md

0 - /settings.json

First of all, you can define your roles, you want to set for each specific level, in a external JSON file to change the settings without editing the source code.

{
    "perms":
    {
        "lvl1": ["Supporter", "Rolle2"],
        "lvl2": ["Admin", "Moderator"],
@zekroTJA
zekroTJA / readme.md
Last active Jan 12, 2020
How to build an embed Builder in JDA
View readme.md

Required Imports

import net.dv8tion.jda.core.EmbedBuilder;
import java.awt.Color;

Build the EmbedBuilder

You can’t perform that action at this time.