Skip to content

Instantly share code, notes, and snippets.

View ttys3's full-sized avatar
💭
sad, ttyS0 has been taken by other user

ttys3

💭
sad, ttyS0 has been taken by other user
View GitHub Profile
@ttys3
ttys3 / .phpstorm.meta.php
Created June 12, 2020 18:17 — forked from barryvdh/.phpstorm.meta.php
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@ttys3
ttys3 / navicat.desktop.sh
Last active July 15, 2020 02:13 — forked from argilzar/navicat.desktop
Create navicat desktop entry ubuntu
cat > ~/.local/share/applications/navicat.desktop <<EOL
[Desktop Entry]
Type=Application
Name=Navicat Premium 15
GenericName=Database Development Tool
Icon=/home/ttys3/.icons/navicat-icon.png
Exec=/home/ttys3/Apps/navicat15-premium-en-patched.AppImage
Categories=Development;
Keywords=database;sql;
Terminal=false
@ttys3
ttys3 / chroot.sh
Created July 25, 2020 18:15 — forked from uglide/chroot.sh
Chroot to Installed system on LVM
#!/bin/bash
fdisk -lu
pvscan
vgscan
vgchange -a y
lvscan
mount /dev/ubuntu-vg/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
@ttys3
ttys3 / arch-chroot
Created July 25, 2020 18:16 — forked from systemdarena/arch-chroot
arch-chroot for fedora
#!/bin/bash
shopt -s extglob
# generated from util-linux source: libmount/src/utils.c
declare -A pseudofs_types=([anon_inodefs]=1
[autofs]=1
[bdev]=1
[binfmt_misc]=1
[cgroup]=1
@ttys3
ttys3 / README.md
Created November 27, 2020 08:32 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@ttys3
ttys3 / line_length.rb
Created December 27, 2020 17:34 — forked from sterpe/line_length.rb
Overcommit LineLength pre-commit hook
# ./.git-hooks/pre_commit/line_length.rb
#
# E.g.:
# Precommit:
# LineLength:
# enabled: true
# description: Verify source line lengths do not exceed 72 columns
# max: 72
# include: ["src/**/*.*"]
#
@ttys3
ttys3 / aes_cbc_pkcs5_b64.go
Created December 30, 2020 02:06 — forked from syed/aes_cbc_pkcs5_b64.go
This simple program is to demonstrate encryption and decryption in golang using AES CBC with PKCS5Padding
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
b64 "encoding/base64"
"errors"
"fmt"
"log"
@ttys3
ttys3 / today_isoweek.go
Last active January 4, 2021 03:37 — forked from icasimpan/today_isoweek.go
golang ambiguous year week number
package main
import (
"fmt"
"time"
)
func main() {
mysqlFmt := "2006-01-02 15:04:05"
ambiguous, err := time.Parse(mysqlFmt, "2021-01-01 13:01:02")
@ttys3
ttys3 / gruvbox-material-alacritty.yml
Created January 16, 2021 03:33 — forked from sainnhe/gruvbox-material-alacritty.yml
Gruvbox Material for Alacritty
# The definition of color schemes.
schemes:
gruvbox_material_hard_dark: &gruvbox_material_hard_dark
primary:
background: '0x1d2021'
foreground: '0xd4be98'
normal:
black: '0x32302f'
red: '0xea6962'
green: '0xa9b665'
@ttys3
ttys3 / Don't use Vim.md
Created January 27, 2021 05:48 — forked from romainl/Don't use Vim.md
Don't use Vim for the wrong reasons

Don't use Vim

Don't do the crime, if you can't do the time.

-- Anthony Vincenzo "Tony" Baretta

Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.

Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.