Skip to content

Instantly share code, notes, and snippets.

View bettysteger's full-sized avatar
🏠
Working from home

Betty Steger bettysteger

🏠
Working from home
View GitHub Profile
@bettysteger
bettysteger / facebox.sass with compass-mixins
Created March 26, 2011 18:04
facebox.sass with compass-mixins
#facebox
position: absolute
top: 0
left: 0
z-index: 100
text-align: left
#facebox .popup
position:relative
border: 3px solid rgba(0,0,0,0)
<div class="row-fluid" ng-controller="ShowsCtrl">
<div class="span6">
<h1>{{seenCount()}} of {{shows.length}} seen</h1>
<ul class="past">
<li ng-repeat="show in shows | filter:query | orderBy:orderProp" class="seen-{{show.seen}}">
<i ng-click="toggleSeen(show)" ng-class="{true:'icon-white icon-eye-close', false:'icon-white icon-eye-open'}[show.seen]"
title="seen?"></i>
<a href="#{{show.id}}">{{show.name}}</a>
<br />
@bettysteger
bettysteger / jsonld.rb
Last active December 15, 2015 17:49
Did anyone tried a JSON-LD Processor with a real data source, eg. DBpedia? this is what i got when using the ruby gem: https://github.com/gkellogg/json-ld could not achieve that with javascript (https://github.com/digitalbazaar/jsonld.js) yet.. is there any best practice to deal with a real data source in combination with JSON-LD?
require 'rubygems'
require 'json/ld'
require 'net/http'
context = {
"foaf" => "http://xmlns.com/foaf/0.1/",
"dbo" => "http://dbpedia.org/ontology/",
"xsd" => "http://www.w3.org/2001/XMLSchema#",
"name" => {
@bettysteger
bettysteger / .bash_profile
Last active March 15, 2019 06:52
make your terminal beautiful! (git branch color etc)
# terminal colors, Git branch in prompt, where am i
export CLICOLOR=1
export TERM=xterm-color
export LSCOLORS=ExFxCxDxBxegedabagacad
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ →\ \1/'
}
export PS1='\[\e[1;37m\][\[\e[1;35m\]\u\[\e[1;37m\]:\[\e[1;36m\]\w\[\e[1;33m\]$(parse_git_branch)\[\e[1;37m\]]$ \[\e[0m\]'
@bettysteger
bettysteger / install-ruby-2.0.0.sh
Last active December 17, 2015 09:08 — forked from sferik/install-ruby-2.0.0.sh
Instructions to install on Ruby 2.0.0-p247 on Mac OS X with homebrew
#!/usr/bin/env sh
brew update
brew upgrade ruby-build
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
ruby -v
@bettysteger
bettysteger / bookmarklet.js
Last active May 19, 2020 05:53
howto make an angular app with a JS bookmarklet
/**
* redirect javascript bookmarklet
*/
// javascript:location.href='http://example.com/?uri='+encodeURIComponent(location.href)
/**
* bookmarklet loaded on site
*/
(function(){
@bettysteger
bettysteger / Preferences.sublime-settings
Last active October 18, 2016 13:24
my personal sublime settings (for sass, rails, bundle, ...)
{
"auto_indent": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"draw_indent_guides": true,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
@bettysteger
bettysteger / contenteditableDrct.js
Last active July 13, 2018 13:22
Angular directive to accomplish two-way data binding for contenteditable elements with ng-model
/**
* Two-way data binding for contenteditable elements with ng-model.
* @example
* <p contenteditable="true" ng-model="text"></p>
*/
app.directive('contenteditable', function() {
return {
require: '?ngModel',
link: function(scope, element, attrs, ctrl) {
@bettysteger
bettysteger / focusMeDrct.js
Last active August 29, 2015 14:02
Angular Directive for auto focusing an element if a value gets true.
/**
* Sets focus to this element if the value of focus-me is true.
* @example
* <a ng-click="addName=true">add name</a>
* <input ng-show="addName" type="text" ng-model="name" focus-me="{{addName}}" />
*/
app.directive('focusMe', ['$timeout', function($timeout) {
return {
scope: { trigger: '@focusMe' },
link: function(scope, element) {
@bettysteger
bettysteger / gravatarImageDrct.js
Last active January 10, 2016 13:23
Angular Directive for a simple Gravatar image
/*
* A simple Gravatar Directive
* @example
* <gravatar-image email="test@email.com" size="50"></gravatar-image>
*/
app.directive('gravatarImage', function () {
return {
restrict: 'AE',
replace: true,
required: 'email',