Skip to content

Instantly share code, notes, and snippets.

View jaapwalhout's full-sized avatar

Jaap Walhout jaapwalhout

View GitHub Profile

App Install Plan

Critical

@djnavarro
djnavarro / bridge.R
Created September 2, 2018 08:19
bridge of eels animation
library(tidyverse)
library(e1071)
library(gganimate)
library(viridis)
ascii_bridge <- "
.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,1,1,1,1,1,1,1,1,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,1,1,1,1,.,1,.,.,.,.,1,.,1,1,1,1,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,1,1,1,1,.,.,.,.,1,.,.,.,.,1,.,.,.,.,1,1,1,1,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
.,.,.,.,.,.,.,.,.,.,.,.,.,.,1,1,.,.,.,1,.,.,.,.,1,.,.,.,.,1,.,.,.,.,1,.,.,.,1,1,.,.,.,.,.,.,.,.,.,.,.,.,.,.
#!/bin/bash
TODAY=`date +%Y-%m-%d`
TODAY_MD=`date +%B\ %d,\ %Y`
YEAR=`date +%Y`
PACKAGENAME=$1
##
## CHANGE ME!!!
MAKE = make -j8
F77 = /usr/local/gfortran/bin/gfortran
FC = /usr/local/gfortran/bin/gfortran
FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CCACHE_CPP = yes
CCACHE_CPP2 = yes
CC = ccache clang -Qunused-arguments
CXX = ccache clang++ -Qunused-arguments
# query run here: https://data.stackexchange.com/stackoverflow/query/edit/543286
#
# select
# TagName,
# str(DATEPART(yyyy, p.CreationDate )) + '-' + str(DATEPART(mm, p.CreationDate )) as postmonth,
# count(pt.PostId) as Num
# from
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 20, 2025 23:02
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@daroczig
daroczig / get-data.R
Last active October 17, 2024 06:13
Number of R packages submitted to CRAN
## original idea & report by Henrik Bengtsson at
## https://stat.ethz.ch/pipermail/r-devel/2016-February/072388.html
## This script downloads the list of currently published R packages
## from CRAN and also looks at all the archived package versions to
## combine these into a list of all R packages ever published on
## CRAN with the date of first release.
## CRAN mirror to use
CRAN_page <- function(...) {
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active April 5, 2025 06:45
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@wch
wch / speed.r
Last active January 31, 2023 01:56
Modifying objects in loops in R, and other speed pitfalls
# =============================================
# Modifying a data frame in place
# =============================================
library(ggplot2)
str(diamonds)
# Modify data frame in place, in loop
# This is super, super slow
system.time({
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite