Skip to content

Instantly share code, notes, and snippets.

View Denver-sn's full-sized avatar
💭

DℰℕVℰℛ Denver-sn

💭
View GitHub Profile
@Denver-sn
Denver-sn / example_bot.py
Created September 17, 2021 15:49
Example pyTelegramBotAPI with SQLite3 #1
import sqlite3
import telebot
TOKEN = "<YOUR BOT TOKEN>"
bot = telebot.TeleBot(TOKEN)
# I suggest you to download SQLite Studio for creating database and tables...
conn = sqlite3.connect('database.db', check_same_thread=False) # Connecting to the database
cursor = conn.cursor()
import multiprocessing
bind = "unix:/run/app.sock" #Socket su cui deve ascoltare gunicorn
threads = multiprocessing.cpu_count() * 2 + 1
wsgi_app = "start:app" #Modulo contenente la flask app
@Ra1d7
Ra1d7 / fbmkr.py
Created August 28, 2019 18:49
Facebook Mass Account Maker
import mechanize
import requests
import re
import logging
import argparse
import sys
reload(sys)
sys.setdefaultencoding('utf8')
@rgwozdz
rgwozdz / nginx-subdomains.md
Created August 14, 2014 01:35
2 node apps on one Ubuntu EC2, access via two different subdomains

create this file:

/etc/nginx/sites-available/crp-pmte-stage.spatialdevmo.com

This file will handle visits to crp-pmte-stage.spatialdevmo.com. A Node.js app running on port 5000 needs to be served. Give the file this content:

upstream crp-pmte-stage {
    server 127.0.0.1:5000;
}
@diyism
diyism / software alternative for linux.md
Last active August 8, 2024 23:45
software alternative for linux,migrating from windows to linux
  1. DOS usb boot -> ubuntu live iso usb boot(too big), minimal_linux_live_20-Jan-2017_64-bit.iso(only 6.8MB)
  2. diskgenius for dos -> testdisk("No Log\Proceed\Intel\Analyse\Quick Search", better than fdisk), gnome-disks
  3. norton ghost for dos -> "fsarchiver savefs" "fsarchiver restfs", remastersys
  4. windows xp -> debian+de(lxde, xfce), kali, ubuntu
  5. ntldr boot.ini -> grub menu.lst, boot-repair
  6. RemapKey/KeyTweak -> xmodmap -pke > ~/.Xmodmap then modify it, it will be loaded automatically
  7. myboard.exe -> myboard.py + modified xorg-server + modified libgtk2.0-0 + fcitx-googlepinyin
  8. MagicMover(D:\Program Files) -> remastersys restored sda1 + UnionFS-FUSE(pivot_root) sda2
  9. WinHex -> wxHexEditor, bless, (sublime hexviewer only can edit one line)
  10. emEditor(PHP/C braces outline, csv editor) -> sublime(ctrl+r to list functions, addon packages: AlignTab,SublimeCodeIntel,Codecs,ConvertToUTF8), SciTE(to view log files)