Skip to content

Instantly share code, notes, and snippets.

View heyalexej's full-sized avatar

Alexej heyalexej

  • rather hard to pin down
View GitHub Profile
@heyalexej
heyalexej / pytz-time-zones.py
Created November 16, 2016 09:14
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@heyalexej
heyalexej / install-charles-proxy.sh
Last active October 14, 2023 19:47
install charles proxy from deb source
#!/usr/bin/env sh
set -e
# install charles proxy from deb sources.
# http://www.charlesproxy.com
sudo sh -c 'echo "deb http://www.charlesproxy.com/packages/apt/ charles-proxy main" > /etc/apt/sources.list.d/charles-proxy.list'
wget -q http://www.charlesproxy.com/packages/apt/PublicKey -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y charles-proxy
@heyalexej
heyalexej / gsm-setup.md
Last active October 13, 2023 09:31
SIM Card Management Through GSM Modem On Linux

SIM Card Management Over GSM Modem

A small guide on how to send and receive USSD codes on Linux

I am using the built in GSM (UMTS) modem of my Thinkpad X1 extensively because I am often in places with flaky internet connections. I connect through the standard Network Manager on Ubuntu and everything works fine. There was one major annoyance though. Every time I wanted to top up the SIM balance or book a new package, I needed a phone to send and receive USSD codes. So I took some time to figure out how to do it from the shell. I wrote this down as a help for others and a reminder for myself. Without further ado...

First intsall gammu and picocom.

~  sudo apt-get install -y gammu picocom
This file has been truncated, but you can view the full file.
{
"settings": {
"servers": {
"server": [
{
"@url": "http://88.84.191.230/speedtest/upload.php",
"@lat": "70.0733",
"@lon": "29.7497",
"@name": "Vadso",
"@country": "Norway",
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter42337284 = new Ya.Metrika({
id:42337284,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
#!/usr/bin/python
# -*- coding: utf-8 -*-
i = ['headline one',
'headline two',
'headline three']
j = ['first line one',
'first line two',
'first line three']
jQuery(document).ready(function() {
var originalTitle = document.getElementsByTagName("title")[0].innerHTML;
jQuery(window).on("blur", function() {
timerId = setTimeout(function() {
document.getElementsByTagName("title")[0].innerHTML = "(1) " + originalTitle;
}
, 2000);
}
);
jQuery(window).on("focus", function() {
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
""" fuzzing accessible urls.
>>> import random, string
>>> ld = string.letters+string.digits
>>> ld
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
>>> len(ld)
62
documentcreatetextnode
telecommunications
sublimedirectory
responsibilities
characterization
troubleshooting
representatives
representations
recommendations
pharmaceuticals
<html><head><link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet"></head><body><div class="table-responsive"><table class="table">
<tr><th>Ratio</th><th>Combos</th></tr>
<tr><td align="center">8.23</td><td align="center" bgcolor="#542437"><font color="#ECD078"><h2>#ECD078 looks good on #542437</h2></font></td></tr>
<tr><td align="center">8.23</td><td align="center" bgcolor="#ECD078"><font color="#542437"><h2>#542437 looks good on #ECD078</h2></font></td></tr>
<tr><td align="center">4.92</td><td align="center" bgcolor="#C7F464"><font color="#556270"><h2>#556270 looks good on #C7F464</h2></font></td></tr>
<tr><td align="center">4.92</td><td align="center" bgcolor="#556270"><font color="#C7F464"><h2>#C7F464 looks good on #556270</h2></font></td></tr>
<tr><td align="center">4.99</td><td align="center" bgcolor="#F1D4AF"><font color="#774F38"><h2>#774F38 looks good on #F1D4AF</h2></font></td></tr>
<tr><td align="center">5.63</td><td align="center" bgcolor="#