This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TweetXer | |
// @namespace https://github.com/lucahammer/tweetXer/ | |
// @version 0.7.0 | |
// @description Delete all your Tweets for free. | |
// @author Luca,dbort,pReya,Micolithe,STrRedWolf | |
// @license NoHarm-draft | |
// @match https://x.com/* | |
// @icon https://www.google.com/s2/favicons?domain=twitter.com | |
// @grant unsafeWindow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Old Reddit Redirect | |
// @description Redirects www.reddit.com to the old version of the website | |
// @downloadURL https://gist.githubusercontent.com/msanders/52700d5c5ed76f1114594ddb862b530e/raw/old-reddit-redirect.user.js | |
// @updateURL https://gist.githubusercontent.com/msanders/52700d5c5ed76f1114594ddb862b530e/raw/old-reddit-redirect.user.js | |
// @version 2023.10.19 | |
// @run-at request | |
// ==/UserScript== | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Remove the performance overlay, it meddles with some tasks | |
unset LD_PRELOAD | |
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper | |
## whilst being launched by plasma-session | |
mkdir $XDG_RUNTIME_DIR/nested_plasma -p | |
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper | |
#!/bin/sh |
Translations: Korean (by Yongwoo Lee)
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
There's two meaning of wildcards in paths for file collections.
*
is a simple, non-recursive wildcard representing zero or more characters which you can use for paths and file names.**
is a recursive wildcard which can only be used with paths, not file names.
For examples,
/var/log/**
will match all files in/var/log
and all files in all child directories, recursively./var/log/**/*.log
will match all files whose names end in.log
in/var/log
and all files in all child directories, recursively./home/*/.bashrc
will match all.bashrc
files in all user'shome
directories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Console\Kernel; | |
use Carbon\Carbon; | |
use Illuminate\Console\Scheduling\Event; | |
use Illuminate\Console\Scheduling\Schedule; | |
use Illuminate\Support\Collection; | |
class ConsoleSchedulingTest extends TestCase | |
{ |
- The
array.filter
method which is a higher order function which means it takes a function as it's argument.
const someArray = ['😁', '💀', '💀', '💩', '💙', '😁', '💙'];
const getUniqueValues = (array) => (
array.filter((currentValue, index, arr) => (
arr.indexOf(currentValue) === index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
NewerOlder