Skip to content

Instantly share code, notes, and snippets.

View vallieres's full-sized avatar
🏡
Working from Home

Alexandre Vallières-Lagacé vallieres

🏡
Working from Home
View GitHub Profile
@limeyd
limeyd / .excludes
Last active January 17, 2017 18:20 — forked from dwayne/.excludes
Webfaction setup
# Exclude files that don't need to be on the server
# Used by rsync when deploying code to the server
.excludes
.git
.gitignore
log/
tmp/
@agarrharr
agarrharr / feed.rss
Last active October 21, 2017 06:29
Jekyll Podcast Feed
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>{{ site.title }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}</link>
<language>en</language>
<managingEditor>{{ site.managerName }} ({{ site.managerEmail }})</managingEditor>
@bserem
bserem / Gulpfile.js
Created July 21, 2016 09:15
Super-gulp for drupal (but not just drupal) theming.
var gulp = require('gulp');
del = require('del');
stripDebug = require('gulp-strip-debug');
gulpIgnore = require('gulp-ignore');
plumber = require('gulp-plumber'); //error handling
replace = require('gulp-replace'); //replace text
livereload = require('gulp-livereload'); // push css changes to browser
autoprefixer = require('gulp-autoprefixer'); // vendor-prefix css
sass = require('gulp-sass'); //libsass
sourcemaps = require('gulp-sourcemaps'); // sourcemaps for SASS->CSS
@hdragomir
hdragomir / index.html
Created July 7, 2014 09:48
IIFE version of SM Font Loading
<script type="text/javascript">
(function (css_href) {
"use strict";
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
} else if (el.attachEvent) {
el.attachEvent("on" + ev, callback);
@markbates
markbates / github-workflows-goreleaser.yml
Last active March 7, 2020 09:00
Run Go tests in Windows, Mac, Linux. Go version 1.12/1.13 both with Modules and GOPATH.
name: Release
on:
release:
types:
- published
jobs:
release:
name: Release
runs-on: ubuntu-latest
@melangue
melangue / run_workflow_from_mac.md
Last active April 17, 2020 08:51
Run workflows in Workflow app from your Mac

Run workflows in Workflow app from your Mac

Choose your workflow from a list, pass some input, hit OK.
You'll get a push notification from Pushbullet on your iOS device.
It will run the specified workflow with your input when opened.

Instructions:

@gunnarlium
gunnarlium / guzzle-retry.php
Created December 17, 2015 16:23
Example of how to create a retry subscriber for Guzzle 6
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request as Psr7Request;
use GuzzleHttp\Psr7\Response as Psr7Response;
use Psr\Log\LoggerInterface;
const MAX_RETRIES = 2;
@davatron5000
davatron5000 / webperformant.htaccess
Created June 6, 2010 18:23
An .htaccess file for web performance and passing Page Speed and YSlow rules
# Enable GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifmodule>
# Expires Headers - 2678400s = 31 days
<ifmodule mod_expires.c>
@psa-jforestier
psa-jforestier / user.py
Last active March 9, 2023 14:44
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@maxcnunes
maxcnunes / curl-get-status-code-and-response-body.sh
Created November 24, 2015 17:52
Curl - Get status code and response body
URL="http://stackoverflow.com/"
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL)
# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
# extract the status
HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')