Skip to content

Instantly share code, notes, and snippets.

View mul14's full-sized avatar
:octocat:
Preparing for big things...

Mulia Nasution mul14

:octocat:
Preparing for big things...
View GitHub Profile
@mul14
mul14 / README.md
Created March 24, 2021 04:17 — forked from danbst/README.md
[Linux] [Firefox] Open link in browser, which is in current workspace

I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.

  • Workspace 0: firefox --no-remote -P MyJob
  • Workspace 1: firefox --no-remote -P default

I have also company Slack on Workspace 0. Which usually contains links to some work stuff.

The problem

@ukn
ukn / 99-install-facetime-camera.sh
Last active May 3, 2024 03:28 — forked from Stono/99-install-facetime-camera.sh
Install the kernal module required for the facetimehd camera to work on Linux
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
@danbst
danbst / README.md
Last active October 22, 2023 12:06
[Linux] [Firefox] Open link in browser, which is in current workspace

I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.

  • Workspace 0: firefox --no-remote -P MyJob
  • Workspace 1: firefox --no-remote -P default

I have also company Slack on Workspace 0. Which usually contains links to some work stuff.

The problem

@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@dannote
dannote / final-cut-pro-trial-reset.swift
Last active April 17, 2024 10:39
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
@superbob
superbob / .zshrc
Created October 28, 2017 12:33
A .zshrc for use with oh-my-zsh on MacOS, fixes COLOR issues (ls colors, tab completion colors) and more.
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="powerlevel9k/powerlevel9k"
DEFAULT_USER="..."
export LS_COLORS="di=34;40:ln=36;40:so=35;40:pi=33;40:ex=32;40:bd=1;33;40:cd=1;33;40:su=0;41:sg=0;43:tw=0;42:ow=34;40:"
@deividaspetraitis
deividaspetraitis / lumen-filesystem.md
Created October 19, 2017 09:36
Lumen flysystem ( filesystem ) integration

Lumen flysystem integration

By default lumen doesn't support laravel file system. In order to integrate to lumen we need follow these instructions:

  1. composer require league/flysystem
  2. Copy filesystems config file from Laravel ( https://github.com/laravel/laravel/blob/master/config/filesystems.php ) to your local Lumen installation document_root/config
  3. Bind filesystem to IoC for example in document_root/bootstrap/app.php by adding this code lines:

`` $app->singleton('filesystem', function ($app) {

@miguelmota
miguelmota / remove_tuxera.sh
Last active April 3, 2024 08:41
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
sudo rm -rf /Applications/Tuxera\ Disk\ Manager.app
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
@ryanoglesby08
ryanoglesby08 / server.js
Last active April 4, 2024 13:25
A node.js SPA server that serves static files and an index.html file for all other routes.
/*
Incredibly simple Node.js and Express application server for serving static assets.
DON'T USE THIS IN PRODUCTION!
It is meant for learning purposes only. This server is not optimized for performance,
and is missing key features such as error pages, compression, and caching.
For production, I recommend using an application framework that supports server-side rendering,
such as Next.js. https://nextjs.org
@mstange
mstange / keyboardlayoutinfo.txt
Created April 6, 2017 22:28
Keyboard layout info with in VS Code for "DVORAK-QWERTYCMD"
Layout info:
{
"id": "com.apple.keylayout.DVORAK-QWERTYCMD",
"lang": "en"
}
isUSStandard: false
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| KeyA | a | A | | A | a | A | [KeyA] | |