Skip to content

Instantly share code, notes, and snippets.

View Goodsmileduck's full-sized avatar
🗺️
Bali

Stanislav Serebrennikov Goodsmileduck

🗺️
Bali
View GitHub Profile
@k4ml
k4ml / tgbot.py
Created June 27, 2015 22:49
Example telegram bot
import bottle
import requests
@bottle.route('/', method='POST')
def telegram_bot():
data = bottle.request.json
url = 'https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage'
try:

Build a scalable Twitter clone with Django and GetStream.io

In this tutorial we are going to build a Twitter clone using Django and GetStream.io, a hosted API for newsfeed development.

We will show you how easy is to power your newsfeeds with GetStream.io. For brevity we leave out some basic Django-specific code and recommend you refer you to the Github project for the complete runnable source code. At the end of this tutorial we will have a Django app with a profile feed, a timeline feed, support for following users, hashtags and mentions.

I assume that you are familiar with Django. If you're new to Django the [official tutorial] (https://docs.djangoproject.com/en/2.0/intro/) explains it very well.

@boodle
boodle / Making Apple Developer certificates on Linux.md
Last active February 21, 2025 20:47
Making Apple Developer certificates on Linux
  1. Create a new directory;
mkdir Apple\ Enterprise
cd Apple\ Enterprise
  1. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
@buruzaemon
buruzaemon / gist:5351379
Last active February 27, 2019 17:08
Sample Postgresql start/stop script for Cygwin
#!/usr/bin/bash
CYGWIN=server
CYGSERVER=/usr/sbin/cygserver
PGDATA=/var/psql/data
PGCTL=/usr/sbin/pg_ctl
PGLOG=/var/psql/log/postgresql.log
usage() {
echo "USAGE: pg (start|stop|restart|reload|status)"
echo
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)