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
/** | |
* PageRank | |
*/ | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
#box { | |
width: 64px; |
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
/** | |
* CSS3 transform overflow | |
*/ | |
.box { | |
width: 130px; | |
overflow: scroll; | |
} | |
.transform { | |
transform: scale(6); | |
display: inline-block; |
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
#!/usr/bin/env fish | |
set -x no_proxy 'localhost,127.0.0.1' | |
function toggle_proxy | |
if not set -q http_proxy | |
set -gx http_proxy 'http://127.0.0.1:8118' | |
set -gx https_proxy $http_proxy | |
echo 'Proxy On' | |
else |
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
#!/usr/bin/env perl6 | |
subset File of Str where *.IO.f; | |
subset Directory of Str where *.IO.d; | |
#| Copies requested packages from Pacman's cache directory | |
sub MAIN (File $pkg_list, Directory $destination) { | |
my @pkg_list = $pkg_list.IO.lines>>.comb(/^^\S+||\S+$$/); | |
die 'Package list is empty' unless @pkg_list; |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use autodie; | |
open my $bspwm_data, '-|', 'bspc subscribe report'; | |
# Autoflush | |
$| = 1; |
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 'Guess the number!'; | |
my Int:D $secret_number := (1..100).pick; | |
loop { | |
with +prompt "Please input your guess.\n" { | |
when UInt:D { | |
put "You guessed: $_"; | |
given $_ <=> $secret_number { |
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
#!/usr/bin/env bash | |
windows=$(swaymsg -t get_tree | jq -r '.. | select(.type? and .type=="workspace") | {workspace: .name, node: recurse(.nodes[], .floating_nodes[])} | "[\(.workspace)]:" + if .node.focused then "*" else "" end + " \(.node.id): " + if .node.app_id then "\(.node.app_id)" elif .node.window then "\(.node.window_properties.class)" else empty end + ": \(.node.name)"') | |
active_window=$(echo "$windows" | grep -nE '^\[[[:alnum:]]+\]:\*' | cut -d : -f 1) | |
echo "$windows" | rofi -dmenu -a $(($active_window - 1)) -i -p 'Select window: ' | cut -d : -f 2 | xargs -I{} swaymsg '[con_id={}] focus' |
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
#!/usr/bin/env bash | |
all_sinks=$(pactl list short sinks | cut -f 2) | |
default_sink=$(pactl info | grep 'Default Sink' | cut -d : -f 2) | |
active_sink=$(echo "$all_sinks" | grep -n $default_sink | cut -d : -f 1) | |
selected_sink=$(echo "$all_sinks" | rofi -dmenu -i -a $(($active_sink - 1)) -p 'Select a device: ') |
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
#!/usr/bin/env bash | |
# Gets a filename and a file type, returns the files with the same type in the same directory | |
function find_files_by_type { | |
directory=$(dirname -- "$1") | |
items=$(fd . "$directory" --exact-depth 1 -t f -x file --mime-type '{}' | rg "$2" | perl -ne 's/:\s+.*$//; print' | sort -V) | |
echo "$items" | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer