Skip to content

Instantly share code, notes, and snippets.

View polyakoff's full-sized avatar
💭
😤

Artem Polyakoff polyakoff

💭
😤
View GitHub Profile
sudo mkdir /media/hdd
sudo blkid # note the drive UUID from here
sudo vi /etc/fstab
# Insert the following (not the tab delimiters between entries):
# Samsung HDD
UUID=3d352762-c75b-4ffb-be0e-32db04a746ee /media/hdd ext4 defaults 0 2
sudo mount -a
# https://esc.sh/blog/how-to-create-new-normal-user-with-sudo/index.html
useradd -m username
# -m creates a home directory for the user.
passwd username
usermod -a -G sudo username
chsh -s /bin/bash username
# HTML
<div id="wrap_main_div">
<div class="cssload-container clearfix">
<div class="cssload-whirlpool"></div>
</div>
</div>
# CSS
#html
<div class="cssload-container">
<div class="cssload-whirlpool"></div>
</div>
#css
@polyakoff
polyakoff / gist:bba79c0799cf62efe4c2c0f2d78eb93a
Created March 15, 2020 17:34
python function in order to login to stackoverflow daily using zapier :3
import requests
url = 'https://stackoverflow.com/users/login'
credentials = {'ssrc': 'login', 'email': '', 'password': ''}
response = requests.post(url, credentials)
response.raise_for_status() # optional but good practice in case the call fails!
print(response.text)
from telethon import TelegramClient
from telethon.tl.functions.channels import GetParticipantsRequest
from telethon.tl.types import ChannelParticipantsRecent
from telethon.utils import get_input_peer
api_id = 123456 # Use your own values here. https://my.telegram.org
api_hash = '0123456789abcdef0123456789abcdef'
phone_number = '+34600000000'
client = TelegramClient('%sessionname%', api_id, api_hash) # feel free to edit %sessionname% as you want
# -*- coding: utf-8 -*-
from pprint import pformat
from urllib2 import _parse_proxy
from twisted.python.log import err
from twisted.web.client import ProxyAgent
from twisted.internet import reactor
from twisted.internet.defer import Deferred
from twisted.internet.protocol import Protocol
from twisted.internet.endpoints import TCP4ClientEndpoint
from google.appengine.api import urlfetch
from google.appengine.api import xmpp
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import xmpp_handlers
import base64
import feedparser
import logging
from google.appengine.api import urlfetch
from google.appengine.api import xmpp
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import xmpp_handlers
import base64
import feedparser
import logging