Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Rosewood Jonathan-Rosewood

View GitHub Profile
View vkcom_audio_download_gevent.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com)
Запуск:
python vkcom_audio_download.py
Принцип работы:
Скрипт проверяет сохраненный access_token. Если его нет или срок истек,
@garyconstable
garyconstable / ftp-scanner-GUI.py
Last active Feb 12, 2018
Python Anonymous FTP Scanner
View ftp-scanner-GUI.py
'''
Anonymous FTP Scanner - with GUI
'''
try:
from Tkinter import *
except ImportError:
from tkinter import *
@maliqq
maliqq / broker.go
Last active Nov 22, 2018
Golang message broker
View broker.go
package protocol
import (
"fmt"
"log"
)
// pubsub
type Broker struct {
Send map[string]*chan *Message
@brbsh
brbsh / rgba_argb.pwn
Last active Feb 12, 2017
Functions to operate RGBA & ARGB hex colors in PAWN
View rgba_argb.pwn
cutAlphaRGBA(rgbacolor) return (rgbacolor >>> 8); // вернет цвет с вырезанной прозрачностью
cutAlphaARGB(argbcolor) return (argbcolor & 0xFFFFFF);
setAlphaRGBA(rgbacolor, alpha = 0xFF) return (cutAlphaRGBA(rgbacolor) | alpha); // вернет цвет с установленной прозрачностью
setAlphaARGB(argbcolor, alpha = 0xFF) return (cutAlphaARGB(argbcolor) | (alpha << 24));
getAlphaRGBA(rgbacolor) return (rgbacolor & 0xFF); // вернет альфу
getAlphaARGB(argbcolor) return (argbcolor >>> 24);
bool:hasAlphaRGBA(rgbacolor) return (getAlphaRGBA(rgbacolor) != 0 && ((rgbacolor >>> 24) != 0));
bool:hasAlphaARGB(argbcolor) return (getAlphaARGB(argbcolor) != 0 && ((argbcolor >>> 8) != 0));
torgba(rgbacolor, &r, &g, &b, &a) // разобьет цвет на состовляющие (red, green, blue, alpha)
@iros
iros / API.md
Created Aug 22, 2012
Documenting your REST API
View API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

You can’t perform that action at this time.