Skip to content

Instantly share code, notes, and snippets.

View joaoffm's full-sized avatar

João Machado joaoffm

  • Creative Tech | Devoteam Portugal
  • Lisboa, Portugal
View GitHub Profile
@joaoffm
joaoffm / SCSS.md
Created July 13, 2017 17:13 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@joaoffm
joaoffm / slack_delete.rb
Created August 1, 2016 10:43 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@joaoffm
joaoffm / bounce_recover_fork.pl
Created February 3, 2016 21:03 — forked from olksdr/bounce_recover_fork.pl
A simple ad-hoc script to parse pmta accounting files to recover bounces..
#!/usr/bin/env perl
use feature qw(say);
use strict;
use warnings;
use utf8;
use 5.16.0;
use IO::Handle;
use IO::Uncompress::Bunzip2 qw(bunzip2 $Bunzip2Error);
@joaoffm
joaoffm / install-redmine.sh
Last active September 12, 2015 12:05 — forked from hilotech/install-redmine.sh
Redmine 3.0.2のインストールスクリプト(CentOS 6.x w/ bash)
#!/bin/bash
set -e
set -u
# must replace with your own configuration
FQDN='redmine.your.domain'
MYSQL_ROOT_PASSWORD='root_password'
DB_APP_PASSWORD='redmine_database_password'
#!/bin/sh
# deploy.sh
N="`readlink \"$1\"`"
mv -T "$1.stage" "$1"
ln -s "$N" "$1.stage"
rm -rf "$N"
cp -aH "$1" "$N"
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';