Skip to content

Instantly share code, notes, and snippets.

@kaitmorano
kaitmorano / README.md
Created October 20, 2015 06:32 — forked from TDahlberg/README.md
GeoData Science Learning Resources

#“A data scientist is someone who knows more statistics than a computer scientist and more computer science than a statistician.” -Josh Blumenstock

#"A geo-data scientist is someone who knows more about GIS than either of those guys." -Tyler Dahlberg

#Going Geo Open Source In all likelihood a list like this has been written somewhere, by someone, for some reason. I know I'm not breaking any ground here; I'm just trying to organize on paper what's been going through my head ever since I got out of grad school.

#!/bin/bash
#
# Kills all iptables rules and unloads all iptables/netfilter related
# kernel modules.
#
# From: https://github.com/netoptimizer/network-testing/blob/master/bin/netfilter_unload_modules.sh
# Author: Jesper Dangaard Brouer <netoptimizer@brouer.com>
# Trick so, program can be run as normal user, will just use "sudo"
if [ "$EUID" -ne 0 ]; then
@ky28059
ky28059 / vercel.md
Last active May 3, 2024 07:30
Deploying to Vercel from an organization for free using GitHub actions

This gist was partially inspired by this blog about Next.js Vercel CI with GitHub actions.

The problem

An easy way to deploy and host websites for free is to use GitHub pages. If you've deployed a Next.js project to GitHub pages, you may have used a GitHub action similar to this in the past to automatically redeploy the site when a new commit is pushed:

# gh-pages-merge.yml
name: Deploy to gh-pages on merge
on:
  push:
@brio1009
brio1009 / BlenderRenderSequenceV1.py
Last active May 3, 2024 07:30
Script to render a sequence of ply files with Blender.
# Script to render a sequence of ply files with Blender. First, setup your scene
# and material for the imported meshes. Scene must be in "OBJECT"-mode.
# Fill in variables in options.
# References.
# See: http://blender.stackexchange.com/questions/24133/modify-obj-after-import-using-python
# and: http://blenderartists.org/forum/showthread.php?320309-How-to-import-ply-files-from-script
import bpy
# Options.
meshFolder = "" # Folder without ending "\\".
@msfjarvis
msfjarvis / mullvad-vpn-speedtest-suite.md
Created January 9, 2019 14:28
Collection of bash hackery to determine which Mullvad WireGuard server is the lowest latency from your location
  • Grab all your wireguard configs from Mullvad and dump them in a folder. For this test, this folder is ~/wireguard/.
  • Add the following function to generate a list of all servers you have configs for
lswg ()  { 
    ls ~/wireguard/ | cut -d '-' -f 2 | sed 's/\.conf//'
}
  • Ping each server 10 times to determine latency.
lswg | xargs -I {} ping -c 10 {}-wireguard.mullvad.net | tee mullvadwgstats
@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active May 3, 2024 07:27
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@dimabory
dimabory / dep.md
Created February 22, 2019 14:59
Dependency Elimination Principle
@romaonthego
romaonthego / NSDateFormatter cheat sheet
Last active May 3, 2024 07:26
Date Formats for NSDateFormatter
a: AM/PM
A: 0~86399999 (Millisecond of Day)
c/cc: 1~7 (Day of Week)
ccc: Sun/Mon/Tue/Wed/Thu/Fri/Sat
cccc: Sunday/Monday/Tuesday/Wednesday/Thursday/Friday/Saturday
d: 1~31 (0 padded Day of Month)
D: 1~366 (0 padded Day of Year)
@sohukia
sohukia / C_CPP_VSCode_INSTALL.md
Last active May 3, 2024 07:25
Install and run C project on VSCode

Warning

This is only for Windows, for Linux or MacOS, please refer to another tutorial. Kiss kiss.

System installation requirements

  • chocolatey. This package will help us install the compiler MinGW and CMake. Just copy and paste this line in a Admin Powershell :
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install cmake