Skip to content

Instantly share code, notes, and snippets.

View ecocode's full-sized avatar

Erik Colson ecocode

View GitHub Profile
@ecocode
ecocode / sway-launcher-desktop.sh
Created October 14, 2019 15:52 — forked from Biont/sway-launcher-desktop.sh
sway-launcher-desktop
#!/usr/bin/env bash
# terminal application launcher for sway, using fzf
# Based on: https://gitlab.com/FlyingWombat/my-scripts/blob/master/sway-launcher
HIST_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/sway-launcher-history.txt"
DIRS=(
/usr/share/applications
~/.local/share/applications
/usr/local/share/applications
@ecocode
ecocode / Test.java
Created March 27, 2014 16:20
Animation with JavaFX
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.animation.RotateTransition;
import javafx.util.Duration;
@ecocode
ecocode / gist:8840449
Last active August 29, 2015 13:56
Check if DNS is still working and report to command-line for failure/success. Dirty but does the job.
use strict;
use warnings;
use DateTime;
my $lastmin = -1; # the last tens of minutes a report was printed
$| = 1; # turn on auto-flushing
my $points = 0;
my $d = DateTime->now( time_zone => 'local' );
my $lastStatus = 0;
print "\rStarted @ ".$d->ymd('.').' '.$d->hms(':')."\n";
do {
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use autodie;
use Carp;
use Net::GitHub;
use Getopt::Lucid ':all';
use Text::Wrap qw/fill/;