Skip to content

Instantly share code, notes, and snippets.

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@danburzo
danburzo / README.md
Last active August 30, 2023 06:52
Scrape your Facebook saved links

Facebook does not provide an easy way to get your saved links out of its system. Here's a quick script that does that for you.

Instructions

Go to your Saved links page and make sure you scroll way down to the bottom so that all your saved items are loaded. This script will generate a simple HTML page with your links, along with an Add to Pinboard action.

Bookmarklet

Drag this to your bookmarks toolbar:

@Christian-G
Christian-G / docx2md.sh
Last active June 28, 2023 11:35 — forked from jesperronn/docx2md.md
Convert Word documents into Markdown
#!/bin/bash
#
# generate a Markdown version of a word document. Goes in separate folder, since
# images are extracted and converted as well (separate folder avoids naming clashes).
#
# REQUIREMENTS: pandoc
#
#
# with pandoc
# --extract-media=[media folder]
@jee-r
jee-r / nginx
Created October 30, 2016 22:06
emby nginx proxypass
# See: https://emby.media/community/index.php?/topic/22889-emby-behind-a-reverse-proxy-remote-control-issue/
server {
server_name mydomain;
listen 80;
rewrite ^ https://mydomain$request_uri? permanent;
}
server {
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active June 29, 2024 09:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@meirbon
meirbon / Dell XPS 15 9560 Manjaro Setup instructions
Last active May 13, 2024 02:39
Small, quick guide to set up Manjaro on the XPS 15 9560
# 1. First of all of course get Manjaro:
https://manjaro.org/get-manjaro/
# I recommend using Etcher to copy the image to your USB:
https://etcher.io/
# 2. Before installing make sure:
# - Secure boot is disabled in BIOS
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active June 27, 2024 17:47
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@PolMine
PolMine / sentiws.R
Last active May 30, 2022 12:37
Import SentiWS dictionary for sentiment analysis into R as data.table
# The get_sentiws function will download the zip-file with the SentiWS dictionary,
# unzip it and return a data.table.
library(data.table)
get_sentiws <- function(){
sentiws_tmp_dir <- file.path(tempdir(), "sentiws")
if (!file.exists(sentiws_tmp_dir)) dir.create(sentiws_tmp_dir)
sentiws_zipfile <- file.path(sentiws_tmp_dir, "SentiWS_v1.8c.zip")
@giodamelio
giodamelio / outline-bookmarklet.js
Last active April 4, 2022 13:01
A bookmarklet to process the current page to Outline.com and redirect afterwards.
fetch(
"https://outlineapi.com/v3/parse_article?source_url=" +
encodeURIComponent(window.location)
)
.then(res => res.json())
.then(body => {
if (body.error) {
return alert(`Outline Bookmarklet Error: ${body.error}`);
}
window.location.href = `https://outline.com/${body.data.short_code}`
# install current version of cwbtools
library(drat)
drat::addRepo("polmine")
install.packages("cwbtools")
# Reencode installed corpus
library(polmineR)