Skip to content

Instantly share code, notes, and snippets.

@llagerlof
llagerlof / 0_reuse_code.js
Created October 27, 2015 16:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@llagerlof
llagerlof / Twitter Cramming.user.js
Created September 27, 2017 18:39 — forked from Prof9/Readme.md
Force enable cramming (280 character tweets) on Twitter. Use TamperMonkey. NOTE: Stops working when you switch pages, refresh to fix. https://twitter.com/Prof9/status/912859110776950784
// ==UserScript==
// @name Twitter Cramming
// @description Force enable cramming (280 character tweets) on Twitter
// @author Prof. 9
// @version 0.1
// @match https://twitter.com/*
// @run-at document-idle
// @namespace prof9.twittercramming
// ==/UserScript==
@llagerlof
llagerlof / update_fork_from_original_repository.md
Last active July 11, 2018 17:54 — forked from CristinaSolana/gist:1885435
Update a fork from the original repository

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
@llagerlof
llagerlof / set_utf8.sh
Last active August 6, 2019 13:36 — forked from panchicore/bash
GIT error on push/pull: "remote: perl: warning: Setting locale failed" [SOLVED]
#!/bin/bash
# perl: warning: Setting locale failed.
# perl: warning: Please check that your locale settings:
# LANGUAGE = (unset),
# LC_ALL = (unset),
# LC_CTYPE = "UTF-8",
# LANG = "en_US.UTF-8"
# are supported and installed on your system.
# perl: warning: Falling back to the standard locale ("C").
git tag -am "annotation goes here" tagname_goes_here # cut a tag
git tag -d tagname_goes_here # burn it
git tag -am "annotation goes here" tagname_goes_here # cut another tag
git push --tags # push tags to remote
git push origin :refs/tags/tagname_goes_here # delete tag from remote
@llagerlof
llagerlof / embedded-file-viewer.md
Created July 22, 2020 19:52 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@llagerlof
llagerlof / index.html
Created November 19, 2020 12:00 — forked from kahole/index.html
*scratch*.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>*scratch*</title>
<style>
body {
font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace;
white-space: pre;
@llagerlof
llagerlof / FFmpeg | Basic Operation on Subtitles.md
Created August 13, 2021 01:39 — forked from innat/FFmpeg | Basic Operation on Subtitles.md
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
@llagerlof
llagerlof / side-by-side-phabriactor-wiki-editor.css
Created August 19, 2021 19:30 — forked from benvium/side-by-side-phabriactor-wiki-editor.css
Userstyle for Phabricator Wiki to enable Side-by-side editing, and to hide loads of unused stuff.Use Patterns: https://*/phriction/edit/*
/* SIDE BY SIDE PHRICTION EDIT */
/* add a userstyle with pattern */
/* L H S */
/* pos of left-hand editor */
.phui-box.phui-box-border.mlt.mll.mlr.phui-object-box.phui-object-box-lightblue {
margin-right: 800px !important;
margin-left:0 !important;
@llagerlof
llagerlof / web-servers.md
Created May 20, 2022 12:41 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000