Skip to content

Instantly share code, notes, and snippets.

## At the get-together of the AGC developers celebrating the 40th anniversary
## of the first moonwalk, Don Eyles (one of the authors of this routine along
## with Peter Adler) has related to us a little interesting history behind the
## naming of the routine.
##
## It traces back to 1965 and the Los Angeles riots, and was inspired
## by disc jockey extraordinaire and radio station owner Magnificent Montague.
## Magnificent Montague used the phrase "Burn, baby! BURN!" when spinning the
## hottest new records. Magnificent Montague was the charismatic voice of
## soul music in Chicago, New York, and Los Angeles from the mid-1950s to
@cosmicexplorer
cosmicexplorer / async-fetch.py
Created September 25, 2016 22:39
example of fetching multiple webpages at once using asynchrony with grequests
# need to 'pip install grequests'
import grequests
from html.parser import HTMLParser
class FetchTitleTag(HTMLParser):
def __init__(self):
HTMLParser.__init__(self)
self.inTitle = False
def handle_starttag(self, tag, attrs):
if tag == 'title':
@dave-ramirez
dave-ramirez / number-prefix-py.json
Last active December 19, 2018 17:37
Códigos de área de teléfonos de las ciudades de Paraguay
{
"0":{
"Ciudad":"3 de Mayo",
"Código":"05478"
},
"1":{
"Ciudad":"Acahay",
"Código":"0535"
},
"2":{
@juanhuttemann
juanhuttemann / main.go
Last active September 13, 2019 03:36
Datos de Asegurados IPS (consulta en paralelo)
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"strconv"
"strings"
"sync"
@ChrisTimperley
ChrisTimperley / install-docker-elementary-loki.sh
Last active April 27, 2020 19:44
Installs Docker on Elementary OS 0.4 (Loki)
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -u -cs) \
stable"
sudo apt-get update
sudo apt-get purge lxc-docker
@pathawks
pathawks / meta.html
Last active May 20, 2020 19:27
Open Graph for Jekyll
{% if include.content %}
<meta property="{{ include.property }}" content="{{ include.content }}" />
{% endif %}
@unacorbatanegra
unacorbatanegra / main.dart
Created January 15, 2021 17:26
Above the keyboard widget
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(
GetMaterialApp(
initialRoute: '/',
initialBinding: BindingsBuilder.put(() => HomeController()),
getPages: [
GetPage(
@mcxiaoke
mcxiaoke / gist:b7dcbfdc800b06a5439bb7eb2cd223dd
Created August 12, 2016 06:34 — forked from AJRenold/gist:4171988
Returning MySQL query data in a csv file with Flask
## I'm working on a project using Flask to access a database and then
## pass on query data to a client where the data will be graphed
## in the browser.
## I wanted to enable users to retrieve the graph data
## in a csv file after clicking a button on the client.
## This is a generalized version of how I did it:
# imports other than Flask
import csv
from sqlalchemy import create_engine
@DRN88
DRN88 / tampermonkey_extract_tradingview_data
Last active November 27, 2021 18:26
Extract tradingview data with tampermonkey script
// ==UserScript==
// @name Extract TradingView Databox on keypress
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.tradingview.com/chart/IQRwR53e/?symbol=USI%3APCC
// @icon https://www.google.com/s2/favicons?domain=tradingview.com
// @grant none
// @run-at document-end
@tjvananne
tjvananne / timestamps_in_R.R
Created January 14, 2018 20:14
R Date Timestamp Epoch Unix Time
library(lubridate) # <3 tidyverse
# this is likely not the most efficient way to generate unix time stamps, but it is intuitive to me
# I like to see how it is done step by step
# to make this more efficient, you could store the "epoch" value outside the function so it
# doesn't have to be calculated every time you call the function
time_since_epoch <- function() {