Skip to content

Instantly share code, notes, and snippets.

@qbektrix
qbektrix / fourdown.py
Created September 15, 2016 10:17 — forked from rvause/fourdown.py
Python script to download images from a thread on 4chan
#!/usr/bin/env python
'''
fourdown.py
A simple script to grab links to images found on a page.
You can use as is for downloading images from thread on 4chan or you can
import FourDown and do what ever you want with it.
@qbektrix
qbektrix / README.md
Created August 31, 2016 17:29 — forked from adewes/README.md
Ebay Ads - Bot. Because who wants to write messages by hand...

To use this bot:

  • Download ads_bot.py and requirements.txt.
  • Type pip install -r requirements.txt to install the requirements.
  • Fill out the required information in the Python file.
  • Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
  • Run the script :)
  • Relax and be ready to answer incoming calls :D
@qbektrix
qbektrix / refutal.md
Created August 11, 2016 07:54 — forked from DimitarChristoff/refutal.md
why jquery is not better than mootools

saw this artcile quoting 10 reasons why jquery is better than mootools. source: http://www.jquery4u.com/articles/jquery-mootools/

jQuery has better mobile support than Mootools – the latest release of jQuery Mobile Alpha 3 has been a breakthrough in how easy it can be to get your website “mobile efficient”. Mootools has mobile support including touch events but it’s not as widely available as jQuery options. (#1 was Previously jQuery vs Mootools filesizes).

not true. see http://moobilejs.com/

jQuery is less confusing than Mootools! – It has less native extensions (including element) – jQuery has about a dozen for Array, Object, and String and Mootools has about six dozen for Array, Object, String, Function, and Number.

how is less power and methods a good thing? the reason why mootools has more native methods is because it also shims browsers that lack ES5 functionality for all the natives that it extends. if anything, this goes against jquery.

@qbektrix
qbektrix / gist:37a7a4fcf55a2450185d4de13a713833
Last active August 10, 2016 16:58 — forked from irace/gist:3366303
Virtualenv cheat sheet
# Install
sudo easy_install virtualenv
# Create a new environment:
cd ~/project
virtualenv env
# Activate
. env/bin/activate
@qbektrix
qbektrix / google-img-resize.mdown
Created March 22, 2016 07:33
Google’s authentication-less on-the-fly image resizing service

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

@qbektrix
qbektrix / concurrency-in-go.md
Created March 12, 2016 07:10 — forked from kachayev/concurrency-in-go.md
Channels Are Not Enough or Why Pipelining Is Not That Easy
@qbektrix
qbektrix / 9 cUrl tips
Created February 12, 2016 10:08 — forked from arielallon/9 cUrl tips
9 cUrl tips
Working with HTTP from the command-line is a valuable skill for HTTP architects and API designers to have. The cURL library and curl command give you the ability to design a Request, put it on the pipe, and explore the Response. The downside to the power of curl is ho https://httpkit.com/resources/HTTP-from-the-Command-Line/ w much breadth its options cover. Running curl --help spits out 150 different flags and options. This article demonstrates nine basic, real-world applications of curl .
In this tutorial we’ll use the httpkit echo service as our end point. The echo server’s Response is a JSON representation of the HTTP request it receives.
Make a Request
Let’s start with the simplest curl command possible.
@qbektrix
qbektrix / faa-333-pdf-gathering.md
Created October 3, 2015 15:07 — forked from dannguyen/faa-333-pdf-gathering.md
Using wget + grep to explore inconveniently organized federal data (FAA Section 333 Exemptions)

if !database: wget + grep

The Federal Aviation Administration is posting PDFs of the Section 333 exemptions that it grants, i.e. the exemptions for operators who want to fly drones commercially before the FAA finishes its rulemaking. A journalist wanted to look for exemptions granted to operators in a given U.S. state. But the FAA doesn't appear to have an easy-to-read data file to use and doesn't otherwise list exemptions by location of operator.

However, since their exemptions page is just one giant HTML table for listing the PDFs, we can just use wget to fetch all the PDFs, run pdftotext on each file, and then [grep](https://medium.com/@rualthanzauva/grep-was-a-private-command-of-m

@qbektrix
qbektrix / how-to-view-source-of-chrome-extension.md
Last active August 29, 2015 06:28 — forked from paulirish/how-to-view-source-of-chrome-extension.md
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=unknown&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@qbektrix
qbektrix / 0-question
Last active August 28, 2015 17:08 — forked from dutc/0-question
larger principles of CPython debugging
> I'm able to follow most of your instructions in the tutorial. However,
> there are things that are not yet obvious to me. If, for instance, I
> want to find the implementation of a specific built-in, where do I go?
> The `dis()` decompilation of `id()`, which I want to study, isn't
> instructive. Using `find ... -print0 | xargs -0 grep ...` also doesn't
> seem to get me anything useful. But I don't even see "builtins" file or
> a section of http://docs.python.org/3.3/c-api/index.html dealing with
> built-ins at all. Where should I be looking; how should I generalize
> this type of search for the future?