Skip to content

Instantly share code, notes, and snippets.

View KlausEverWalkingDev's full-sized avatar
🇧🇷

Klaus Ferreira KlausEverWalkingDev

🇧🇷
View GitHub Profile
@woosal1337
woosal1337 / classDemo.py
Created July 3, 2021 03:51
GitHub-Copilot-Demo
class Student():
def __init__(self, name, age):
self.name = name
self.age = age
def show(self):
print(self.name)
print(self.age)
def set_age(self, age):
@takanuva
takanuva / agt.h
Last active July 25, 2022 19:57
Simple generic print() and scan() macros
/*******************************************************************************
* Copyright 2022 Paulo Torrens *
* *
* 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: *
* *
@rponte
rponte / using-uuid-as-pk.md
Last active May 2, 2024 11:01
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@VycktorStark
VycktorStark / main.py
Last active August 13, 2020 15:28
Simple bot with polling - TELEGRAM BOT
__author__ = "Vycktor Stark"
"""
This is a simple project to run a bot on the telegram via polling (webscraping) without using a module or lib
to start the code, after the download, just first insert your bot key to it and run as follows: `python3 main.py`
Note: I am aware that it is much more practical to use the / lib module to create the code faster,
but the goal of this snippet is to demonstrate an alternative for you to create the code your way
"""
from threading import Thread
import json, requests, re, time
@VycktorStark
VycktorStark / main.py
Last active June 15, 2020 10:26
Simple bot with webhook - TELEGRAM BOT
__author__ = "Vycktor Stark"
"""
This is a simple project to run your bot on Telegram and receive requests for new events via webhook on your server
To be very practical, I am using the / lib flask module to create this project!
Where you just need to declare your bot's token and the code itself will import other things, like your host, Instructions:
- Declare your bot's token here;
- Run the script on your server;
- Access your host + webhookstart (example: https://mysite.com/webhookstart)
@CalisaP
CalisaP / truthy_falsy.js
Last active June 30, 2019 17:59
fCC: Intermediate Algorithm Scripting: Everything Be True
//Check if the predicate (second argument) is truthy on all elements of a collection (first argument).
function truthCheck(collection, pre) {
// .every returns one value if EVERY object statifies the test.
// !! (double bang) typecasts the property value to a boolean value.
// It will return true if the property value is truthy & false if the property doesn't exist/has a falsy value.
return collection.every(obj => !!obj[pre]);
}
truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
@castis
castis / bluetoothctl.py
Last active April 11, 2023 00:00 — forked from egorf/bluetoothctl.py
Bluetoothctl wrapper in Python
# Based on ReachView code from Egor Fedorov (egor.fedorov@emlid.com)
# Updated for Python 3.6.8 on a Raspberry Pi
import time
import pexpect
import subprocess
import sys
import logging
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active May 5, 2024 06:59
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@jq2
jq2 / gist:1c3771d581015648c807d2abebc989e6
Last active January 4, 2021 03:53
Lista de canais com cursos e/ou vídeo aulas sobre computação (Português pt_BR).
Code Shadow
https://www.youtube.com/c/CodeShadow
DevDojo
https://www.youtube.com/channel/UCjF0OccBT05WxsJb2zNkL4g/playlists
Tutorial Python - Abel Separovich
https://www.youtube.com/user/Oseparovich/playlists