Skip to content

Instantly share code, notes, and snippets.

View ByteDecoder's full-sized avatar
🏠
Working from home

Rodrigo Reyes ByteDecoder

🏠
Working from home
View GitHub Profile
@ByteDecoder
ByteDecoder / timeago.js
Created April 7, 2021 21:30 — forked from caiotarifa/timeago.js
"Distance of Time in Words" in Vanilla JavaScript.
var TimeAgo = (function() {
var self = {};
// Public Methods
self.locales = {
prefix: '',
sufix: 'ago',
seconds: 'less than a minute',
minute: 'about a minute',
@ByteDecoder
ByteDecoder / CreateTilesFromTileset.cs
Created November 20, 2020 08:19 — forked from omardelarosa/CreateTilesFromTileset.cs
Tilemap Importer - PyxelEdit to Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.Tilemaps;
using System.IO;
public class CreateTilesFromTileset : EditorWindow
{
int padding = 5;
int buttonHeight = 25;
@ByteDecoder
ByteDecoder / CreateTilesFromTileset.cs
Created November 20, 2020 08:19 — forked from omardelarosa/CreateTilesFromTileset.cs
Tilemap Importer - PyxelEdit to Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.Tilemaps;
using System.IO;
public class CreateTilesFromTileset : EditorWindow
{
int padding = 5;
int buttonHeight = 25;
@ByteDecoder
ByteDecoder / regenerate_credentials.md
Created October 31, 2020 01:37 — forked from db0sch/regenerate_credentials.md
How to regenerate the master key for Rails 5.2 credentials

If your master.key has been compromised, you might want to regenerate it.

No key regeneration feature at the moment. We have to do it manually.

  1. Copy content of original credentials rails credentials:show somewhere temporarily.
  2. Remove config/master.key and config/credentials.yml.enc
  3. Run EDITOR=vim rails credentials:edit in the terminal: This command will create a new master.key and credentials.yml.enc if they do not exist.
  4. Paste the original credentials you copied (step 1) in the new credentials file (and save + quit vim)
  5. Add and Commit the file config/credentials.yml.enc
@ByteDecoder
ByteDecoder / string.compress.js
Created September 16, 2020 19:03 — forked from fliptopbox/string.compress.js
JavaScript String compression
/*
@fliptopbox
LZW Compression/Decompression for Strings
Implementation of LZW algorithms from:
http://rosettacode.org/wiki/LZW_compression#JavaScript
Usage:
var a = 'a very very long string to be squashed';
var b = a.compress(); // 'a veryāăąlong striċ to bečquashed'
@ByteDecoder
ByteDecoder / license-badges.md
Created September 9, 2020 17:01 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  

Translations: (No guarantee that the translations are up-to-date)

@ByteDecoder
ByteDecoder / .editorconfig
Last active August 31, 2020 20:52
Kontra + Parcel + TypeScript + ESlint + Prettier
root = true
[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@ByteDecoder
ByteDecoder / create-gh-pages.sh
Created August 14, 2020 06:32
Create the gh-pages branch
git checkout --orphan gh-pages
git reset .
rm -r *
rm .gitignore
echo 'The documentation will be here.' > index.html
git add index.html
git commit -m 'Initialize the gh-pages orphan branch'
git push -u origin gh-pages
@ByteDecoder
ByteDecoder / iterm2-solarized.md
Created August 12, 2020 22:39 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@ByteDecoder
ByteDecoder / Powerline.md
Created August 12, 2020 21:56 — forked from wm/Powerline.md
Installing powerline on Mac OSX. The following was done in version Version 10.8.2

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew