Skip to content

Instantly share code, notes, and snippets.

View danyalette's full-sized avatar

Danya Lette danyalette

  • University of Toronto
  • Toronto
View GitHub Profile
@danyalette
danyalette / bash_ascii_animation.sh
Last active February 15, 2019 11:52
bash function to print an ascii animation. takes a directory as an argument. prints the contents of each file in the directory, in sequence.
#!/bin/bash
# hash bang bin bash!
function ascii_anim() {
if [[ $# -eq 0 ]] ; then
echo 'Please specify a directory.'
return
fi
@danyalette
danyalette / slideshow.scss
Last active February 20, 2017 06:48
pure scss slideshow
$images: "/images/fun.jpg", "/images/yay.jpg", "/images/wow.jpg";
$slide_duration: 2s;
//preload images
body:before {
$urls: url('');
@each $image in $images {
$urls: $urls + url(#{$image}) ;
}
/* assuming you are programmatically adding the following classes to the body:
- text-zoom-70
- text-zoom-100
- text-zoom-130
*/
@mixin font-size-accessible($font-size) {
font-size: $font-size;
@danyalette
danyalette / fontelloMakeSvgFiles.php
Last active June 8, 2016 21:34
make svg files from a fontello font's generated config file (for custom icons only)
<?php
$string = file_get_contents("config.json");
$json = json_decode($string, true);
$glyphs = $json[glyphs];
// make directory to hold resultant files
if (!file_exists('svg')) {
mkdir('svg', 0755, true);
}
@danyalette
danyalette / ls-recent.sh
Created May 19, 2016 17:30
lsr - bash function to list most recently modified files in dir, takes 1 argument - max number of files to list
function lsr(){
# check if no argument has been supplied
if [ $# -eq 0 ]
then
# if no arg, set file count to 1
count=1
else
# if there is an arg, make sure it's an integer
re='^[0-9]+$'
if ! [[ $1 =~ $re ]] ; then

Keybase proof

I hereby claim:

  • I am danyalette on github.
  • I am danyalette (https://keybase.io/danyalette) on keybase.
  • I have a public key ASDr95oH_Oy4izQEjqb18c05Sgj_3D2RPOxYs1q4AkhVBQo

To claim this, I am signing this object: