Skip to content

Instantly share code, notes, and snippets.

View steko's full-sized avatar
💭
I may be slow to respond.

Stefano Costa steko

💭
I may be slow to respond.
View GitHub Profile
@jorinvo
jorinvo / challenge.md
Last active April 21, 2023 17:14
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@tiernano
tiernano / gist:9c061ae8d1312190f152
Last active March 29, 2018 22:13
Hubic, Swift and CURL
Get Endpoint:
curl -H "Authorization: Bearer <AUTHCODE>" https://api.hubic.com/1.0/account/credentials
returns:
{"token":"<AUTHTOKEN>","endpoint":"https://lb1.hubic.ovh.net/v1/<AUTHURL>","expires":"2015-04-01T23:01:08+02:00"}
Get List of files:
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@mbostock
mbostock / .block
Last active September 30, 2016 16:15
Reprojecting CSV with ogr2ogr
license: gpl-3.0
@benmarwick
benmarwick / opencontext.r
Last active September 16, 2016 22:55
Experimenting with the opencontext.org API using R
# To get to animal bones in Turkey:
q <- "http://146.148.79.138/sets/Turkey.json?geodeep=10&prop=oc-gen-cat-animal-bone&prop=oc-zoo-anatomical-meas---oc-zoo-von-den-driesch-bone-meas---oc-zoo-bd"
# httr method
library(devtools)
install_github('hadley/httr')
library(httr)
@jasonsperske
jasonsperske / MIT-LICENSE
Last active March 1, 2023 03:06
A simple Python program that can read DOOM.Hexen IWAD and PWAD files and render them as SVG see examples at http://jason.sperske.com/wad/
MIT License
Copyright (c) 2018 Jason Sperske
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 use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@benmarwick
benmarwick / PDF-2-text-or-CSV.r
Last active July 18, 2022 03:48
Convert PDFs to text files or CSV files (DfR format) with R
# Here are a few methods for getting text from PDF files. Do read through
# the instructions carefully! NOte that this code is written for Windows 7,
# slight adjustments may be needed for other OSs
# Tell R what folder contains your 1000s of PDFs
dest <- "G:/somehere/with/many/PDFs"
# make a vector of PDF file names
myfiles <- list.files(path = dest, pattern = "pdf", full.names = TRUE)
@xiaohanyu
xiaohanyu / nanoc_pandoc.rb
Created March 30, 2014 02:37
Improved nanoc pandoc filter
# This file provide two pandoc filters for html and pdf output
module Nanoc::Filters
class PandocHtml < Nanoc::Filter
identifier :pandoc_html
type :text => :text
def run(content, params = {})
input_format = case item[:extension]
@illarionvk
illarionvk / extract_data.js
Created January 13, 2014 09:04
Find elements in 50 HTML files, extract data and create Jekyll post files with YAML metadata using Node.js
// 1. Get list of files
// 2. For each file:
// 2.1 Read a file
// 2.2 Find required data
// 2.3 Put the information in a JSON object
// 3. Convert JSON object to YAML
// 4. Write new Markdown file in _posts folder
var fs = require('fs')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.