Skip to content

Instantly share code, notes, and snippets.

View jeffersonRibeiro's full-sized avatar
:octocat:
Focusing

Jefferson Ribeiro jeffersonRibeiro

:octocat:
Focusing
View GitHub Profile
@retpolanne
retpolanne / slack-afk.sh
Last active December 30, 2020 17:09
Slack script that changes your status to AFK or Working Remotely
#!/bin/bash
usage="$(basename "$0") [OPTIONS] -- changes your Slack status to AFK or Working Remotely
[OPTIONS]:
-h|--help This help message
--afk Changes your Slack profile to AFK
--remote Changes your Slack profile to Working Remotely
--token Your Slack token (see https://api.slack.com/legacy/custom-integrations/legacy-tokens)
"
@bradtraversy
bradtraversy / docker-help.md
Last active November 25, 2024 13:57
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@cvan
cvan / HOWTO.md
Last active October 27, 2024 09:49
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@rveitch
rveitch / sass-7-1-pattern.scss
Last active November 13, 2024 08:34
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@girlcheese
girlcheese / gist:29acea17ba606b01153c
Last active June 12, 2020 03:31
slotRenderEnded listener event (DFP)
googletag.pubads().addEventListener("slotRenderEnded", function(event) {
//console.log("googletag slotRenderEnded", event.slot.b.f);
var containerId = "";
// WARN: Fragile access of private object within DFP Slot Object returned with the event
// It's the only way to get access to the id of the DOM element attached to the slot
// FIXME: Ideally we need to contact Google and request a public API method to return the id
if (typeof event.slot !== "undefined") {
if (typeof event.slot.b !== "undefined") {
@EmilEriksen
EmilEriksen / gist:b7d492229aa658439ce3
Last active January 29, 2019 08:22
Add event tracking to Ninja Forms submit
add_action( 'ninja_forms_display_js', 'prefix_track_form_submission' );
function prefix_track_form_submission() {
?>
<script>
//<![CDATA[
$( '.ninja-forms-form' ).on( 'submitResponse', function( e, response ) {
var errors = response.errors;
if ( errors == false ) {
// This is where you put the tracking code. This only fires if form submission is successfull
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin