Skip to content

Instantly share code, notes, and snippets.

View eleloya23's full-sized avatar

Eloy eleloya23

View GitHub Profile
@eleloya23
eleloya23 / toggle-screen.sh
Created March 31, 2014 20:09
Rotate Thinkpad Yoga 12.5 on Ubuntu
#!/bin/bash
# Info:
# This is the laptop im talking about: http://shop.lenovo.com/us/en/laptops/thinkpad/yoga-series/yoga
# I'm running Ubuntu 12.04 with Gnome3
#
# The following script toggles the orientation of you screen between NORMAL and INVERTED
# You may bind this script to a key using xbindkeys or gnome-control-center keyboard preferences.
touchscreen='ELAN Touchscreen'
@eleloya23
eleloya23 / lenovo.conf
Created April 9, 2014 21:40
Fixes Lenovo Thinkpad Yoga S1 weird touchpad issues.
# The default mouse/touchpad configuration for some thinkpads and ideapads is very buggy.
#
# The pointer jump's when clicking
# Pointer movement is very jerky
# The touchpad is very sensitve
# This configuration file attemps to fix it.
# My laptop is: Lenovo Thinkpad Yoga
# My OS: Ubuntu 12.04 precise
@eleloya23
eleloya23 / retro.ps1
Created July 18, 2014 20:57
Windows 8 RETRO Script
<#
Windows 8 RETRO Script
Removes as much METRO as possible. Stay RETRO my friend.
Policies:
1.- Disable the hot corners
2.- Disable forced reboots for Windows Updates
3.- Disable Microsoft Account Linking
4.- Disable Lock Screen
@eleloya23
eleloya23 / pop3-pass-fuzz.rb
Created May 3, 2016 12:31
Simple Ruby POP3 Fuzzer
#!/usr/bin/ruby
# ELELOYA
# Simple POP3 Fuzzer
require 'socket'
host = ARGV[0] || "127.0.0.1"
port = ARGV[1] || 110
buffer = ["A"]
@eleloya23
eleloya23 / periscope_url.sql
Created January 28, 2017 07:23
A postgres pure function that allow you to generate periscope embedded urls.
-- We must have a function that given the json data and the api key, it must generate the correct periscope_url
-- ########################################
-- select periscope_url('jsondata', 'api');
-- #########################################
-- JSON DATA USED by DOCS: '{"dashboard":7863,"embed":"v2","filters":[{"name":"Filter1","value":"value1"},{"name":"Filter2","value":"1234"}]}'
-- API KEY USED BY DOCS: 'e179017a-62b0-4996-8a38-e91aa9f1'
-- Proof Of Concept:
-- psql=# select periscope_url('{"dashboard":7863,"embed":"v2","filters":[{"name":"Filter1","value":"value1"},{"name":"Filter2","value":"1234"}]}', 'e179017a-62b0-4996-8a38-e91aa9f1');
-- https://www.periscopedata.com/api/embedded_dashboard?data=%7B%22dashboard%22%3A7863%2C%22embed%22%3A%22v2%22%2C%22filters%22%3A%5B%7B%22name%22%3A%22Filter1%22%2C%22value%22%3A%22value1%22%7D%2C%7B%22name%22%3A%22Filter2%22%2C%22value%22%3A%221234%22%7D%5D%7D&signature=adcb671e8e24572464c31e8f9ffc5f638ab302a0b673f72554d3cff96a692740
@eleloya23
eleloya23 / mode_analytics_url.py
Created January 31, 2017 02:50
Mode Analytics Easier Url Signature Function
import md5
import hmac
import base64
import hashlib
import time
def sign_url(url, key, secret):
request_type = 'GET'
content_type = ''
content_body = ''
@eleloya23
eleloya23 / apns.py
Last active July 18, 2017 00:24
APNs Modified for Python 3
# PyAPNs was developed by Simon Whitaker <simon@goosoftware.co.uk>
# Source available at https://github.com/simonwhitaker/PyAPNs
#
# PyAPNs is distributed under the terms of the MIT license.
#
# Copyright (c) 2011 Goo Software Ltd
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to