Skip to content

Instantly share code, notes, and snippets.

View lolajl's full-sized avatar

Lola J. Lee Beno lolajl

View GitHub Profile

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@paulklinkenberg
paulklinkenberg / gist:839431
Created February 22, 2011 21:26
Get random winner
<cfhttp url="http://blog.bittersweetryan.com/2011/02/post-some-cf-code-on-github-and-win.html" />
<cfset possibleWinners = {} />
<cfset commentsHtmlArr = rematch("<dt class='comment-author.*?</dd>", rereplace(cfhttp.filecontent, '[\r\n]+', '', 'all')) />
<cfset gistURLRegex = "https://gist\.github\.com/[0-9]+" />
<cfloop from="1" to="#arrayLen(commentsHtmlArr)#" index="arrIndex">
<cfset currHtml = commentsHtmlArr[arrIndex] />
<cfif refindNoCase(gistURLRegex, currHtml)>
<cfset gistURL = reMatchNoCase(gistURLRegex, currHtml) />
<cfset gistURL = gistURL[1] />
@addyosmani
addyosmani / codereview.md
Created August 25, 2011 12:11
Lessons from a JavaScript code review

#Lessons From A JavaScript Code Review

I was recently asked to review some code for a new JavaScript application and thought I might share some of the feedback I provided as it includes a mention of JavaScript fundamentals that are always useful to bear in mind. Code reviews are possibly the single biggest thing you can do to improve the overall quality of your solutions and if you're not actively taking advantage of them, you're possibly missing out on bugs you haven't noticed being found or suggestions for improvements that could make your code better.

##Challenges & Solutions

Code reviews go hand-in-hand with maintaining strong coding standards. That said, standards don't usually prevent logical errors or misunderstandings about the quirks of a programming language. Even the most experienced developers can make these kinds of mistakes and code reviews can greatly assist with catching them.

Often the most challenging part of code reviews is actually finding an experienced developer you trust to complete

@carloszaragoza
carloszaragoza / export2csv.cfm
Created October 29, 2012 21:36
Export data to CSV from ColdFusion
<!--- Read data from two datasource tables. --->
<cfquery
name="iae1" datasource="escolar_db13">
select * from v_rc_iae_pr1
</cfquery>
<cfscript>
//Use an absolute path for the files. --->
theDir=GetDirectoryFromPath(GetCurrentTemplatePath());
theFile=theDir & "exportData.xls";
//Create two empty ColdFusion spreadsheet objects. --->
@rafmagana
rafmagana / git-edit.sh
Last active December 10, 2015 00:19
Script to open modified, cached/staged or untracked files in a git repo with macvim.
#!/usr/bin/env bash
function git_edit_files
{
# Init
local type=$1
# Commands
local ls_files='git ls-files'
local diff='git diff --cached --name-only'
# Messages
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 21, 2024 05:35
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@Gram21
Gram21 / .zshrc
Last active November 6, 2023 17:00
Standard .zshrc files
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gnzh"
# Texteditor and zshconfig aliases
@veggiemonk
veggiemonk / .gitconfig
Last active February 19, 2024 16:49
simple zshrc config file with Oh-My-ZSH
[user]
name = Julien Bisconti
email = ******
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/vim
[alias]
wow = log --all --graph --decorate --oneline --simplify-by-decoration
@BretFisher
BretFisher / present.zsh-theme
Last active September 22, 2023 11:33
oh-my-zsh theme for presentations (hides prompt features based on path)
# problem: when presenting, I want to obscure
# my prompt to act like it's at root of file system
# and be very basic with no git info, etc.
# solution: this theme lets you set a ENV to the path
# of your presentation, which will help remove unneeded prompt
# features while in that path
# oh-my-zsh theme for presenting demos
# based off the default rubbyrussell theme
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created