Skip to content

Instantly share code, notes, and snippets.

View SergioGeeK7's full-sized avatar
🏠
Working from home

Sergio A. SergioGeeK7

🏠
Working from home
View GitHub Profile
@wrighter
wrighter / get_ticks.py
Created January 23, 2020 23:45
A basic Interactive Brokers command line Python application to fetch streaming market data.
#!/usr/bin/env python
""" A simple Interactive Brokers application that will fetch
current market data for a contract from the IB TWS/Gateway. """
import argparse
import logging
from typing import List
from ibapi import wrapper
@taitems
taitems / plate-snitch.js
Created August 20, 2017 03:56
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 26, 2024 16:33 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@rodrigohenriques
rodrigohenriques / ClickToSelectEditText.java
Last active February 12, 2023 07:44
Used to make your EditText a better option than Spinners
public class ClickToSelectEditText<T extends Listable> extends AppCompactEditText {
List<T> mItems;
String[] mListableItems;
CharSequence mHint;
OnItemSelectedListener<T> onItemSelectedListener;
public ClickToSelectEditText(Context context) {
super(context);
@Antarix
Antarix / layout_border_bottom
Created February 3, 2013 14:53
Setting specific border i.e top,bottom,left,right or all for Android layout
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape
android:shape="rectangle">
<!-- Set the border color of your layout here -->
<stroke android:width="1dp" android:color="#3AFB03" />
<solid android:color="#3AFB03" />
</shape>
@pithyless
pithyless / gist:1547408
Created January 1, 2012 14:02
jQuery set Headers for $.ajax
// jQuery Headers support for $.ajax
$.ajax({
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Accept","application/json");
}
type: "POST",
url: "/article",
processData: false,