Skip to content

Instantly share code, notes, and snippets.

View lee2sman's full-sized avatar

Lee T lee2sman

  • W/O/R/L/D/W/I/D/E
View GitHub Profile
@jdkanani
jdkanani / notepad.html
Last active April 6, 2024 17:09 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@abishur
abishur / menu_launcher.py
Last active April 4, 2024 13:42
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
@cvan
cvan / HOWTO.md
Last active March 20, 2024 17:56
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@robertcedwards
robertcedwards / Move.cs
Last active February 25, 2024 22:27
Movement Script in C# for Unity
private float speed = 2.0f;
public GameObject character;
void Update () {
if (Input.GetKey(KeyCode.RightArrow)){
transform.position += Vector3.right * speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.LeftArrow)){
transform.position += Vector3.left* speed * Time.deltaTime;
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@aparrish
aparrish / semantic_similarity_chatbot.ipynb
Created July 17, 2018 17:33
Semantic similarity chatbot (with movie dialog). Gist mirror of Colab notebook here: https://colab.research.google.com/drive/1XlmtcyMdPRQC6bw2HQYb3UPtVGKqUJ0a Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lee2sman
lee2sman / setting-up-i3-for-dvorak.md
Last active September 30, 2023 02:12
I cobbled together a method to install i3 window manager for Dvorak

Setting up i3 when you use Dvorak

The process to set up i3 for use by Dvorak users is maddening and works unlike any other window manager or software I've used previously. It's especially difficult for me since I don't remember QWERTY anymore (it's been 14 years for me) and I have Dvorak positioned keys on my keyboard.

Anyway, here is the unpleasant process to get it to work at a bare minimum. I haven't found this documented in a single place elsewhere, and the steps usually assume that you understand how to do something in i3 already.

Download and install i3. I read you need these other packages as well. I'm coming from Ubuntu.

sudo apt install i3 i3status dmenu i3lock xbacklight feh
@jwinder
jwinder / sonic-pi-tutorial.md
Last active September 22, 2023 20:12
Sonic Pi in-app tutorials concatenated - last synced 27-08-2023 - https://sonic-pi.net/tutorial.html - https://github.com/samaaron/sonic-pi - All credit & thanks to Sam Aaron!

1 Welcome to Sonic Pi

Welcome friend :-)

Welcome to Sonic Pi. Hopefully you're as excited to get started making your own sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.

@abhisheknaik96
abhisheknaik96 / twitterJekyllEmbed.md
Last active September 5, 2023 05:26
A tutorial on embedding a twitter stream to a Jekyll project.

Embedding a twitter stream in Jekyll

  1. Create a _plugins folder in your root.
  2. Add the following to _config.yml
plugins:
  - jekyll-gist
  1. If you don't have a Gemfile associated with your Jekyll project, create one with the following text
@r00k
r00k / vimrc
Last active May 13, 2023 09:34
A minimal vimrc for beginners
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Last change: 2012 Jan 20
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc