Skip to content

Instantly share code, notes, and snippets.

View rjfranco's full-sized avatar
🙂
Either working or playing video games

Ramiro Jr. Franco rjfranco

🙂
Either working or playing video games
View GitHub Profile
@rjfranco
rjfranco / freebsd-nginx-init-script
Last active February 5, 2016 10:55
WIP: attempting to write an init script for nginx on freebsd 10.2
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
# PROVIDE: nginx
#
# chkconfig: - 85 15
# description: NGINX is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
@rjfranco
rjfranco / gist:60646e527651728e69c3
Created September 22, 2015 08:08
Getting Symlinks in Vagrant on Windows 10 with VirtualBox 5
- Add this line in Vagrant File
# Enables symlinks on Windows VBox
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
- in an admin command prompt, run:
fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
- boot vagrant from new admin powershell session
/micon Ascend
/ta <t>
/p Raising ===> <t>
/ac Swiftcast
/wait 1
/ac Ascend
/tlt
/wait 59
/echo Instant Ascend Ready
@rjfranco
rjfranco / error
Last active August 29, 2015 14:13
Ember.js Error when updating properties
Uncaught Error: Assertion Failed: An attribute binding was triggered when the element was not in the DOM
ember.js?body=1:3903
Ember.assertember.js?body=1:7393
applyAttributeBindingsember.js?body=1:41697
merge.invokeObserverember.js?body=1:43838
CoreView.extend._wrapAsScheduled.stateCheckedFnember.js?body=1:849
Queue.invokeember.js?body=1:914
Queue.flushember.js?body=1:719
DeferredActionQueues.flushember.js?body=1:144
Backburner.endember.js?body=1:547
@rjfranco
rjfranco / archive-email-with-hotkey.scpt
Created December 4, 2014 23:46
Archive Email with hotkey in Mac Outlook
tell application "Microsoft Outlook"
set myMessages to selection
set firstMessage to item 1 of myMessages
set theAccount to account of firstMessage
set archiveFolder to folder "Archive" of theAccount
repeat with eachMessage in myMessages
set eachMessage's is read to true
move eachMessage to archiveFolder
end repeat
end tell
Collision: #FFFFFF, #F4F4F4
- #FFFFFF [line: 125, 157, 164, 171, 192, 197, 223, 232, 263, 279, 290, 317, 388, 469, 543, 544, 545, 642, 1110, 1144, 1288, 1288, 1289, 1289, 1290, 1290, 1389, 1390, 1458, 2210, 2373, 2446, 2476, 2688, 2799, 2809, 3051, 3086, 3101, 3111, 3169, 3338, 3427, 3503, 3567, 3838, 3893, 3928, 3950, 3976, 4003, 4259, 4273, 4620, 4668, 4698, 4816, 5027, 5128, 5241, 5297, 5387, 5388, 5403, 5642, 5938] is too close (2.217402585730237) to #F4F4F4 [line: 486, 537, 2977]
Collision: #FFFFFF, #F9F9F9
- #FFFFFF [line: 125, 157, 164, 171, 192, 197, 223, 232, 263, 279, 290, 317, 388, 469, 543, 544, 545, 642, 1110, 1144, 1288, 1288, 1289, 1289, 1290, 1290, 1389, 1390, 1458, 2210, 2373, 2446, 2476, 2688, 2799, 2809, 3051, 3086, 3101, 3111, 3169, 3338, 3427, 3503, 3567, 3838, 3893, 3928, 3950, 3976, 4003, 4259, 4273, 4620, 4668, 4698, 4816, 5027, 5128, 5241, 5297, 5387, 5388, 5403, 5642, 5938] is too close (1.1980804237236402) to #F9F9F9 [line: 791, 2673, 2674, 2675, 2676, 2677, 2678, 4683, 4684, 46
@rjfranco
rjfranco / _mixin.scss
Created May 7, 2014 19:20
Object Oriented Media Queries with Sass
@mixin respond-to($media) {
@if $media == small {
@media only screen and (max-width: 1024px) {
@content;
}
}
@if $media == tablet {
// @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
// @content;
// }
@rjfranco
rjfranco / .powenv
Created April 25, 2014 21:26
Sample .powenv creted for use with Pow and RVM
# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if
@rjfranco
rjfranco / scroll-ajax-loader.coffee
Last active August 29, 2015 13:58
Sample implementation for infinite scroll Ajax Loader
class MyPhotoViewer
showPhotos: (data) =>
photo_list_view = '<ul class="photo-list"></ul><section class="ajax-loader"><img src="/assets/ajax-loader.gif" alt="loading..." /></section>'
@element.append photo_list_view
$(window).on 'DOMContentLoaded load resize scroll', @morePhotos
@addPhotos data
morePhotos: =>
if @scrollerInView() and !(@paging.active or @paging.complete)
$('section.ajax-loader img').slideDown 'fast'
@rjfranco
rjfranco / jpg-to-gif-with-resize.sh
Created November 1, 2013 23:31
Converting and resizing batches of jpgs in a directory to gif (depends on imagemagick)
for i in $( ls *.jpg); do convert -resize 50% $i $i.gif; done