Skip to content

Instantly share code, notes, and snippets.

View LeetCodes's full-sized avatar
🎱
Choppin' caine rain, hail, sleet, or snow

LeetCodes

🎱
Choppin' caine rain, hail, sleet, or snow
View GitHub Profile
@LeetCodes
LeetCodes / Installing ffmpeg.md
Last active April 27, 2018 10:59
Commands for installing ffmpeg on common operating systems.

Installing FFmpeg in Windows

  1. Download a static build from here.
  2. Use 7-Zip to unpack it in the folder of your choice.
  3. Open a command prompt with administrator's rights.
    NOTE: Use CMD.exe, do not use Powershell! The syntax for accessing environment variables is different from the command shown in Step 4 - running it in Powershell will overwrite your System PATH with a bad value.
  4. Run the command (see note below; in Win7 and Win10, you might want to use the Environmental Variables area of the Windows Control Panel to update PATH):
    setx /M PATH "path\to\ffmpeg\bin;%PATH%"
    Do not run setx if you have more than 1024 characters in your system PATH variable. See this post on SuperUser that discusses alternatives. Be sure to alter the command so that path\to reflect
@LeetCodes
LeetCodes / 3d-glitch-text-css-only.markdown
Created April 29, 2018 22:58
3D Glitch Text (CSS Only)

3D Glitch Text (CSS Only)

Trying to recreate a Pen I had seen with nothing but CSS. Thought It'd be cool to have the 3D text colours being used. Let your curser disappear in the trip. With "epilepsy" mode.

A Pen by Leetcodes on CodePen.

License.

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@LeetCodes
LeetCodes / ReadMe.md
Created May 6, 2018 07:42
[QUICK TUTO] How to boot Linux on your Switch

I've successfully booted ArchLinux using ShofEL2. Here is a quick guide on how to do it - I'll assume you're computer literate and know how to use a terminal / Linux commands / git. Everything is taken from the README of the ShofEL2 repo so if you want to go even faster, go read that instead.

Thanks to NightHammer1000 and Y2K-x for the help !

There is a simplified and faster version of this tutorial available here, with precompiled binaries so you don't have to build everything : https://github.com/SoulCipher/shofel2_linux

The result

ImageMagick and FFMPEG commands

Remember that the order of parameters/options is very important.

convert images and save to another dir
convert *.png -set filename:original %t 'export/%[filename:original].jpg'
resize, change dpi and quality
@LeetCodes
LeetCodes / index.html
Created May 22, 2018 18:00
yeet.codes
<div class="page__content" id="home">
<h1 class="yee">
<span class="yeet">Yeet</span>
<span class="beyond-words">beyond words.</span>
</h1>
<h1 class="yee" style="left:100px;">
<span class="yeet">Yate</span>
<span class="day-words">every day,</span>
</h1>
<h1 class="yee" style="right:75px;">
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@LeetCodes
LeetCodes / index.html
Created June 1, 2018 05:52
Reverse clip path with blend modes
<!-- Define our SVG clip path -->
<svg width='0' height='0'>
<defs>
<clipPath id="cp" clipPathUnits="objectBoundingBox">
<path d="M0.500, 0.945 L0.994, 0.090 L0.006, 0.090 L0.500, 0.945 L0.500, 0.650 L0.262, 0.238 L0.738, 0.237 L0.500, 0.650z"></path>
</clipPath>
</defs>
</svg>
<!-- The actual elements we're using -->
@LeetCodes
LeetCodes / createjs-drag-n-drop-w-drop-zone.markdown
Created June 13, 2018 12:25
CreateJS: Drag n Drop w/Drop Zone

80s Typography

I've successfully combined 4 things I absolutely love, Typography, Design, Web Development and 80s style bravado. Super happy with the results. All done in CSS.

A Pen by Leetcodes on CodePen.

License.