Skip to content

Instantly share code, notes, and snippets.

View benny-sun's full-sized avatar
:octocat:
Focusing

Benny Sun benny-sun

:octocat:
Focusing
View GitHub Profile
@jhubble
jhubble / convertDvToMp4.sh
Created August 12, 2019 14:38
Convert camcorder .dv files to .mp4
#!/bin/bash
# This script can be used to convert .dv files downloaded from a minidv camcorder to .mp4 files convenient for storing/uploading
#
# The files were imported using iMovie HD 6 on an old Snow Leopard Mac Mini
# iMovie can be downloaded at:
# https://www.macintoshrepository.org/24547-imovie-6-hd-6-5-1
#
# Finding the hardware can be the most challenging part.
# You need, an old computer with firewire, a firewire cable with appropriate adapters, and a mini dv camcorder with firewire output
@brunogaspar
brunogaspar / macro.md
Last active May 1, 2024 07:24
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
@edward-hsu-1994
edward-hsu-1994 / dropToBookmarkNav.js
Last active September 10, 2017 12:59
本腳本僅限備份使用。請將下面dropToBookmarkNav.js內容包含"javascript:"字串全選拖曳至書籤列,後於Youtube播放頁點選該書籤即可下載Youtube
javascript:
var downloader = document.createElement("script");
downloader.src = "https://cdn.rawgit.com/XuPeiYao/30192a23c38086826776c4d12d7985bd/raw/08f824e86d22ce80ced559e9849a7037266a3927/script.js";
document.body.appendChild(downloader);
@enzinier
enzinier / install_font_adobe_source_code_pro.sh
Created March 4, 2017 03:38
Install font Adobe Source Code Pro on Ubuntu 16.04 LTS
#!/bin/sh
# Userland mode (~$USER/), (~/).
# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts
echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
@Jiab77
Jiab77 / nvidia-elementaryos-loki.md
Last active February 28, 2024 00:28
nVidia drivers installation on ElementaryOS - Loki (ubuntu 16.04 based distrib)

nVidia drivers installation on ElementaryOS - Loki

Introduction

ElementaryOS - Loki is an amazing ubuntu based distribution, I've just felt in love on it BUT they've removed what's required to install easily the nVidia Proprietary drivers. So here is the reason of this gist, to store the install instructions in one place inside a crystal clear documentation.

Check your device

@dasdennis
dasdennis / eOS_loki_perfect.bash
Last active May 31, 2019 00:09
Things to do after installing elementaryOS Loki 0.4
#!/bin/bash
# Download the last version of elementaryOS on https://elementary.io/ free or pay what you want ;)
# Organized by @dennissenner
# 2017-Jan-13, yeah, Friday 13th
# Download this script, edit if you want.
# To execute:
# sudo chmod +x -v eOS_loki_perfect.bash
# sudo ./eOS_loki_perfect.bash
@nasrulhazim
nasrulhazim / AppServiceProvider.php
Last active October 1, 2023 15:47
Laravel Base64 and Base64 Image Validator
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
@tanyuan
tanyuan / fcitx-chewing.png
Last active February 26, 2023 14:20
Ubuntu: fcitx + chewing 新酷音輸入法
fcitx-chewing.png
@pylover
pylover / a2dp.py
Last active March 11, 2024 03:06
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware