Skip to content

Instantly share code, notes, and snippets.

View cisolarix's full-sized avatar
🌻
Cool

Yanming Deng cisolarix

🌻
Cool
  • Indie Hacker
  • Nanchang, Jiangxi, China
  • 03:33 (UTC +08:00)
View GitHub Profile
@cisolarix
cisolarix / delete_git_submodule.md
Created October 11, 2022 11:31 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@cisolarix
cisolarix / subtitle-overlap-fixer.go
Created April 12, 2020 13:05 — forked from nimatrueway/subtitle-overlap-fixer.go
Little tool to fix overlapping subtitles (especially the ones extracted from english auto-subtitles of youtube, vtt files that you would convert to srt with ffmpeg)
package main
import (
"time"
"regexp"
"bufio"
"strconv"
"fmt"
"os"
"errors"
@cisolarix
cisolarix / mysql2-mojave.md
Created April 24, 2019 07:00 — forked from fernandoaleman/mysql2-mojave.md
Install mysql2 on MacOS Mojave

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@cisolarix
cisolarix / dabblet.css
Created November 5, 2018 04:51
Vertical centering - Viewport unit method
/**
* Vertical centering - Viewport unit method
*/
main {
width: 18em;
padding: 1em 1.5em;
margin: 50vh auto 0;
transform: translateY(-50%);
box-sizing: border-box;
@cisolarix
cisolarix / config.rb
Created August 3, 2017 12:10 — forked from guiman/config.rb
Example mina deploy script using docker
require 'mina/git'
require 'mina/nginx'
set :application, 'your_app_name'
set :domain, 'your_server'
set :user, 'ubuntu'
set :deploy_to, '/location/to/deploy'
set :app_path, "#{deploy_to}/#{current_path}"
set :repository, 'your_repo'
set :branch, 'master'
@cisolarix
cisolarix / Readme.md
Created July 28, 2017 02:40 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@cisolarix
cisolarix / live reload.md
Created June 18, 2015 05:45
live reload

bundle exec guard -P livereload

@cisolarix
cisolarix / xunlei_download_links_grabber.rb
Created May 10, 2015 02:38
xunlei_download_links_grabber
江西经济发展研究院
研究生学院
校办公室
国际学院
档案馆
信息管理学院
资产管理处
外国语学院
马克思主义学院
老干处