Skip to content

Instantly share code, notes, and snippets.

View tobybot11's full-sized avatar
🎯
Focusing

Tobias Ford tobybot11

🎯
Focusing
View GitHub Profile
@seece
seece / extending csv.md
Last active November 13, 2022 01:07
A Straightforward Way To Extend CSV With Metadata

A Straightforward Way To Extend CSV With Metadata

Pekka Väänänen, Aug 19 2021.

This proposal is a response to It's Time to Retire the CSV by Alex Rasmussen and the discussion on lobste.rs. Don't take it too seriously.

CSV files (comma-separated values) are great but sometimes difficult to parse because everybody seems to have a slightly different idea what CSV means. The obvious solution is to transmit some metadata that tells what to expect but where do you put it? Well, how about a ZIP archive?

An archive with two files. The first file, say format.txt, has the metadata inside and the second one is the original CSV file unchanged. This is still readable by non-technical users because ZIP files are natively supported by both Windows and macOS. People can double click on them like a directory and then double click again on the CSV to open it up in Excel.

@IanColdwater
IanColdwater / twittermute.txt
Last active April 3, 2024 19:43
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@amitmerchant1990
amitmerchant1990 / stylish.css
Last active March 26, 2021 02:21
Revert back to good old GitHub Homepage
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the CSS mentioned below.
3. Specify the "URLs on the domain" to be `github.com`.
4. Add a title and save.
*/
.dashboard-sidebar {
float: right;
padding-right: 10px;
@danvk
danvk / index.html
Created April 4, 2018 16:47
Demonstration of polygon outlines in Mapbox GL JS
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Update a choropleth layer by zoom level</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.1/mapbox-gl.js'></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/topojson.v2.min.js"></script>

Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

@boxdot
boxdot / async.rs
Last active November 9, 2022 12:03
Async stdin reading with thread and futures in Rust
extern crate futures;
use std::io::{self, BufRead};
use std::thread;
use futures::{Future, Sink, Stream};
use futures::stream::BoxStream;
use futures::sync::mpsc::channel;
fn stdin() -> impl Stream<String, io::Error> {
@JJediny
JJediny / RHEL6STIGtoNIST800.csv
Created January 11, 2017 16:26
RHEL6 STIG w/ NIST 800-53 Controls - Example output from https://github.com/opencontrol/xccdf2csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
STIG ID,Version,Rule Title,Title,Severity,Check Text,Fix Text,CCI,CCI,Status,Published,contributor,Definition,Type,NIST800-53rev4,Control,NIST800-53rev3,Control,NIST800-53rev1,Control
38437,RHEL-06-000526,Automated file system mounting tools must not be enabled unless needed.,SRG-OS-999999,low,"To verify the ""autofs"" service is disabled, run the following command:
chkconfig --list autofs
If properly configured, the output should be the following:
autofs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Verify the ""autofs"" service is not running:
@natemartinsf
natemartinsf / LinkButton.js
Created November 27, 2016 05:48
Wrapped @blueprintjs Button to work with React-Router
import React, {Component} from 'react';
import { Button } from '@blueprintjs/core';
import withRouter from 'react-router/lib/withRouter';
let typeOf = (o) => toString.call(o).slice(8, -1).toLowerCase();
function createLocationDescriptor({to, query, hash, state}) {
if (typeOf(to) === 'string') {
return {pathname: to, query, hash, state};
}
@dnordby
dnordby / rails-background-workers-with-resque.md
Last active December 20, 2017 15:52
Set up background workers on Heroku with Reqsque/Redis

Set Up Background Workers with Resque/Redis on Heroku

LOCAL SETUP

Ensure Redis is installed on local machine

To install, run (assumes HomeBrew is already set up):
$ brew install redis

Start Redis server
$ redis-server

@gambtho
gambtho / gist:36a2f01e9e7d8c1b0046fb074f1a44ee
Last active August 25, 2021 12:45
Zookeeper.service systemd script for zookeeper
from - http://davidssysadminnotes.blogspot.com/2016/01/installing-apache-kafka-and-zookeeper.html
[smack1]# vi /etc/systemd/system/kafka-zookeeper.service
[Unit]
Description=Apache Zookeeper server (Kafka)
Documentation=http://zookeeper.apache.org
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple