Skip to content

Instantly share code, notes, and snippets.

View rufatpro's full-sized avatar
🎯
Focusing

NRR rufatpro

🎯
Focusing
View GitHub Profile
@mmccaff
mmccaff / json-split.py
Created September 30, 2015 20:05 — forked from 97-109-107/json-split.py
A tiny python thing to split big json files into smaller junks.
#!/usr/bin/env python
# based on http://stackoverflow.com/questions/7052947/split-95mb-json-array-into-smaller-chunks
# usage: python json-split filename.json
# produces multiple filename_0.json of 1.49 MB size
import json
import sys
with open(sys.argv[1],'r') as infile:
o = json.load(infile)
@dennislwy
dennislwy / rsa.py
Last active April 12, 2023 03:46
Python helper class to perform RSA encryption, decryption, signing, verifying signatures & generate new keys
# RSA helper class for pycrypto
# Copyright (c) Dennis Lee
# Date 21 Mar 2017
# Description:
# Python helper class to perform RSA encryption, decryption,
# signing, verifying signatures & keys generation
# Dependencies Packages:
# pycrypto
@JoeyBurzynski
JoeyBurzynski / sample-in-stock-product.jsonld
Last active June 27, 2024 14:20
Sample Product JSON-LD (In Stock)
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
"name": "Kenmore White 17\" Microwave",
@JoeyBurzynski
JoeyBurzynski / product-jsonld-example.jsonld
Created June 27, 2017 13:35
Product JSON-LD Example
{
"@context": "http://schema.org",
"@type": "Product",
"description": "Ultralight and packable, this down jacket is a consummate traveler, whether your destination is cross town or far off the beaten path. Nylon shell with 650 fill Premium Down insulation for superior warmth that easily compresses into the included pouch for storage.",
"image": "http://eddiebauer.scene7.com/is/image/EddieBauer/D0060103_409C1?$mainimageV2$",
"mainEntityOfPage": "http://www.eddiebauer.com/product/women-39-s-cirruslite-down-jacket/20612407",
"name": "Women's CirrusLite Down Jacket",
"sku": "123456789",
"gtin14": "12345678901234",
"mpn": "925873",
@zhangyubaka
zhangyubaka / Telegram-history-dump.py
Last active August 30, 2024 10:13
Telegram-history-dump.py
import telethon
from telethon.tl.functions.messages import GetDialogsRequest
from telethon.tl.types import InputPeerEmpty
from time import sleep
import multiprocessing
import json
API_ID=
API_HASH=
global client # Dirty hack.
@Guitlle
Guitlle / access2csv.py
Last active June 23, 2022 10:06
Access to csv exporter with UCanAccess.
"""
This script exports all tables in a MSAccess file to a bunch of CSV's.
It depends on UCanAccess binaries, which can be downloaded from here:
http://ucanaccess.sourceforge.net/site.html
It supports MSAccess 2016 and previous versions.
Make sure to set pathUCA to the path of the UCanAccess binaries.
"""
from subprocess import Popen, PIPE, STDOUT
import io
@lon-io
lon-io / self-signed-ssl-certificate.md
Created August 8, 2018 15:23 — forked from clemlatz/self-signed-ssl-certificate.md
Setup a self-signed SSL certificate with Nginx (server and browser)

1. Configure server: Nginx

Create the certificate:

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt

Create a strong Diffie-Hellman group:

$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
We can't make this file beautiful and searchable because it's too large.
1,google.com
2,youtube.com
3,facebook.com
4,baidu.com
5,wikipedia.org
6,qq.com
7,amazon.com
8,yahoo.com
9,taobao.com
10,tmall.com
@ofou
ofou / servers.csv
Created April 11, 2021 06:15
List of servers to test speedtest-cli
We can't make this file beautiful and searchable because it's too large.
Country,City,Provider,Host,ID
Abkhazia,Sukhum,Aquafon GSM,62.182.8.78:8080,9058
Abkhazia,Sukhum,"Systema, LTD",cyxym.net:8080,5089
Abkhaziya,Sukhum,A-Mobile,speedtest.a-mobile.biz:8080,9714
Afghanistan,Herat,Afghan Wireless,hrtspeedtest.afghan-wireless.com:8080,9622
Afghanistan,Kabul,Afghan Telecom,sp1.afghantelecom.af:8080,11019
Afghanistan,Kabul,etisalat Afghanistan,speedtest.etisalat.af:8080,21807
Afghanistan,Kabul,Afghan Wireless,speedtest.afghan-wireless.com:8080,5189
Afghanistan,Kabul,Afghan Wireless Communication Company,kdzspeedtest.afghan-wireless.com:8080,13501
Afghanistan,Kabul,Insta Telecom,speedtest.instatelecom.com:8080,12798
@rufatpro
rufatpro / encoding-video.md
Created July 12, 2022 09:20 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus