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
# Located in ~/.zshrc | |
ZSH_THEME="muse" | |
alias desk="cd ~/Desktop" | |
alias code="cd ~/Code" | |
alias git="hub" | |
alias ga="git add" | |
alias gc="git commit" | |
alias gpom="git push origin master" |
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
require 'open-uri' | |
require 'nokogiri' | |
require 'mechanize' | |
def ffffound_pages(number) | |
pg_counter = 0 | |
while pg_counter < 25*number |
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
# Open the source file & store each element in an array | |
# (sans the newline character) | |
def parse_file(file) | |
arr = [] | |
list = File.open(file) | |
list.each do |item| | |
if item.include? "\n" | |
arr << item.chomp | |
else | |
arr << item |
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
app.controller('FormController', function( $scope, $http, $routeParams ){ | |
'use strict'; | |
var self = this, | |
kickoffId = '99999', // https://app.kickofflabs.com/dashboard/campaigns/36854/api | |
url, | |
config, | |
socialRef, | |
id; |
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 file_info[:control_info].length > 0 | |
all_keys = [] | |
keys = [] | |
file_info.each do |fi| | |
fi[:control_info].each do |arr| | |
keys << arr[1] | |
end | |
all_keys += [keys] | |
keys = [] | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://www.dropbox.com/s/l6hgjq7mh52o6od/spiceworks-sdk.js?dl=1&raw=1" type="text/javascript"></script> | |
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var card = new SW.Card(); | |
var inventory = card.services('inventory'); | |
inventory.request('devices').then(function(data){ |
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
def update_xml_file(string_to_add, file) | |
# Ready a formatted string and XML'ify it | |
new_xml = Nokogiri::XML::DocumentFragment.parse(string_to_add) | |
# Open the XML file to which we add | |
@xml_file = Nokogiri::XML(File.read(file)) | |
# Find the last instance of the `here` node | |
@insertion_point = @xml_file.css('here').last | |
# Stick the XML'ified string after the last 'here' node | |
@insertion_point.add_next_sibling(new_xml) | |
# Save it all |
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
app.factory( 'getIP', function ( $http ) { | |
'use strict'; | |
var self = this; | |
return function getIP () { | |
self.ipCheck = 'http://ipinfo.io/json'; | |
return $http.get(self.ipCheck) | |
.then(function (result){ | |
return result; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://www.dropbox.com/s/l6hgjq7mh52o6od/spiceworks-sdk.js?dl=1&raw=1" type="text/javascript"></script> | |
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script> | |
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var card = new SW.Card(); | |
var tix = card.services('helpdesk'); |
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
require 'minitest/autorun' | |
class RobotTest < MiniTest::Unit::TestCase | |
def test_name_sticks | |
robot = Robot.new | |
robot.name | |
assert_equal robot.name, robot.name | |
end | |
end |
OlderNewer