Skip to content

Instantly share code, notes, and snippets.

@bzerangue
bzerangue / data.csv
Created December 24, 2020 22:26 — forked from Monichre/data.csv
Demo of importing a CSV file into a Contentful space
first name last name age
Stephen Sugden 31
Tom Reznik 29
Justin Thomas 30
@bzerangue
bzerangue / BulkRename.applescript
Created December 5, 2020 18:49 — forked from nrollr/BulkRename.applescript
Bulk rename files with csv file
-- Store the .csv file in the same directory as the files you wish to rename
-- Replace 'username' in the path with your own (lines 3 & 10)
set csvFile to "/Users/username/Documents/index.csv"
set csvList to paragraphs of (read csvFile)
set {theID, my text item delimiters} to {my text item delimiters, ","}
repeat with csvLines in csvList
set {oldName, newName} to text items of csvLines
tell application "System Events"
set name of file oldName of folder "/Users/username/Documents/" to newName
@bzerangue
bzerangue / MySQL_macOS_Sierra.md
Created September 11, 2018 21:22 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@bzerangue
bzerangue / nasa.xsl
Created July 21, 2018 13:03 — forked from netsensei/nasa.xsl
Converts XML output of the US GSA Social Media API to CSV - http://registry.usa.gov/accounts.xml?agency_id=nasa
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:variable name="delimiter" select="','" />
<!-- define an array containing the fields we are interested in -->
<xsl:variable name="fieldArray">
<field>service_id</field>
<field>account</field>
@bzerangue
bzerangue / import.rb
Last active August 29, 2015 14:23 — forked from daveaseeman/import.rb
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'reverse_markdown'
# usage: ruby import.rb feed.xml
# feed.xml is an file you can download from most websites that support RSS
data = File.read ARGV[0]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="page-title.xsl"/>
<xsl:import href="navigation.xsl"/>
<xsl:import href="date-time.xsl"/>
<xsl:output method="html" encoding="utf-8" indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
@bzerangue
bzerangue / home.xml
Last active August 29, 2015 14:07 — forked from bauhouse/home.xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
<params>
<today>2011-10-27</today>
<current-time>16:00</current-time>
<this-year>2011</this-year>
<this-month>10</this-month>
<this-day>27</this-day>
<timezone>-07:00</timezone>
<website-name>Symphony CMS</website-name>
/*
_______
These simple SCSS/SASS mixins for Foundation 4 are made by me to deal with media-queries and have a clean code at the same time! ;)
****IMPORTANT****
Due to Foundation 4 uses mobile-first methodology, every $phone-"X" variable in these mixins defines the value for every screen size.
$desktop-"X" values overrides $phone-"X" values when the width of the window is 768px and above.
@bzerangue
bzerangue / whichquery.sass
Created April 26, 2012 15:49 — forked from wyattdanger/whichquery.sass
Determine which media query breakpoint you're on
body::before
content: '< 480px'
@media only screen and (min-width: 480px)
body::before
content: '480px < 600px'
@media only screen and (min-width: 600px)
body::before
content: '600px < 768px'
@bzerangue
bzerangue / gist:2491702
Created April 25, 2012 17:59 — forked from ericdfields/gist:1717578
Bash convert all your .css to .scss in one line (because you've seen the light)
# From .css to .scss
for f in *.css; do sass-convert -F css -T scss $f ${f%%.*}.scss; done