Skip to content

Instantly share code, notes, and snippets.

@CIAvash
CIAvash / bspwm_workspaces.pl
Last active December 5, 2016 11:49
A simple script for printing bspwm workspaces with Pango markup, to be used with Yabar status bar.
#!/usr/bin/env perl
use strict;
use warnings;
use autodie;
open my $bspwm_data, '-|', 'bspc subscribe report';
# Autoflush
$| = 1;
@CIAvash
CIAvash / cp-pkgs.p6
Last active October 17, 2016 13:18
Copy Pacman's cached packages
#!/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;
#!/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
@CIAvash
CIAvash / dabblet.css
Created July 2, 2012 08:39
CSS3 transform overflow
/**
* CSS3 transform overflow
*/
.box {
width: 130px;
overflow: scroll;
}
.transform {
transform: scale(6);
display: inline-block;
/**
* PageRank
*/
* {
margin: 0;
padding: 0;
}
#box {
width: 64px;