Skip to content

Instantly share code, notes, and snippets.

View lolajl's full-sized avatar

Lola J. Lee Beno lolajl

View GitHub Profile
@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] />
@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
@reflexdemon
reflexdemon / reflex+terminal.md
Last active September 28, 2020 10:03
Make the terminal beautiful using Zsh on Linux Mint

Reflex Terminal

Most people who as seen my terminal always asked what I do to make it look fancy. The secret is very simple,I just use some of the cool stuff that is available on my platform,

On Debian. bases systems you can use the following command and get your cool stuff,

$ sudo apt-get install jq, httpie, figlet
@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. --->
@jonathan-soifer
jonathan-soifer / dotfiles
Last active May 16, 2021 18:06
System and Shell setting for happiness and productivity
# Softwares that I currently use:
• Productivity Related Software (TunnelBear, 1Password, CleanMyMac, Alfred, DisableMonitor, Unarchiver, Spectacle)
• Terminal Related Tools (xcode-tools, homebrew, git, ripgrep, ngrok, curl, eslint, tmux, aws cli, ctags)
• Design Related Software (Figma, Wacom, Adobe Creative Cloud)
• Terminal Software (iTerm2, Z-Shell, Oh My ZSH, Agnoster Theme, Z Script, GPG Tools)
• Browsers Extensions (1Password, Pocket, React DevTools, Redux DevTools)
• Communication Related Software (Zoom.us, What'sapp, Slack, Mac Mail)
• Office Related Software (Word, Excel, Adobe Acrobat)
• Music/Audio Related Software (Spotify, Boom 2)
@tpiros
tpiros / robbyrussell.zsh-theme
Created November 1, 2019 10:39
Adding emojis to ZSH theme
# On a Mac: /Users/<username>/.oh-my-zsh/custom/themes
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
local emojis=("👋" "🤡" "🦄" "🤙" "🐼" "😊" "🔥" "⚡" "😎" "🌎")
local selectedEmoji=${emojis[$[1+($RANDOM%${#emojis[@]})]]}
local today=$(date +%m.%d)
# local ipCountry=`curl -s ip-api.com/json | python -c "import sys, json; print json.load(sys.stdin)['country']"`
# local country=$emoji_flags[${ipCountry}]
# }
case $today in
"01.01")
@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
@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

@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