Skip to content

Instantly share code, notes, and snippets.

View RichardDally's full-sized avatar
🏠

Richard Dally RichardDally

🏠
  • Paris, France
  • 10:53 (UTC +02:00)
View GitHub Profile
@everpeace
everpeace / docker-compose.yml
Last active April 7, 2024 10:00
kafka cluster in docker-compose.
# WARNING: This docker-compose.yml is only for testing purpose.
# Parameters:
# - name: CONFLUENT_PLATFORM_VERSION
# default: 3.0.0
# reference: https://hub.docker.com/u/confluentinc/
# Ports:
# - description: Major ports are exposed to host computer
# - zookeeper: 2181
# kafka1: 9091
# kafka2: 9092
# Original: https://paste.wuffs.org/raw/160201.220633.4garttu6
from twitter import *
import json
import sys
import mysql.connector
import random
conn = mysql.connector.connect(user='wikistuff', password='ffutsikiw', unix_socket='/var/run/mysqld/mysqld.sock', database='wikistuff')
c = conn.cursor()
@joepie91
joepie91 / vpn.md
Last active May 5, 2024 17:55
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@rdenadai
rdenadai / torrents.py
Last active August 10, 2022 20:39
A simple python script that downloads a deezer playlist and bam! download magnetic files from pirate bay or monova and put on transmission torrent client... keep in mind that you need transmission to run this, open it and configure the remote option in preferences!
# DEPENDENCIES
# LINUX INSTALLS!
# apt-get install transmission firefox python-dev python-pip
# PYTHON LIBS NEED IT!
# pip install requests beautifulsoup4 transmissionrpc pyopenssl ndg-httpsclient pyasn1 selenium
import requests as req
import transmissionrpc
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@eykd
eykd / output
Created July 31, 2013 21:59
Python Serialization: Comparing the performance of msgpack, cPickle, and marshal.
In [33]: msgpack_lt, pickle_lt, marshal_lt
Out[33]: (0.004015207290649414, 0.039834022521972656, 0.007205963134765625)
In [34]: msgpack_dt, pickle_dt, marshal_dt
Out[34]: (0.015387773513793945, 0.04079103469848633, 0.006851911544799805)
In [35]: len(s_msgpack), len(s_pickle), len(s_marshal)
Out[35]: (16, 48, 41)
@tmacam
tmacam / export-process.rst
Created June 12, 2011 19:13
Short guide on how to export code to Git and tidy up its history

Exporting code to Git and tiding up its history

Author

Tiago Alves Macambira [tmacam burocarata org]

Licence

Creative Commons By-SA

Table of Contents