This file contains hidden or 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
func greeting(person: String) -> (greeting: String, language: String) { | |
let language = "English" | |
let greeting = "Hello \(person)" | |
return (greeting, language) | |
} | |
greeting("Tom") | |
//Access only the language value: | |
let (person,_) = greeting("Tom") | |
println(person) |
This file contains hidden or 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
http://www.howtogeek.com/62999/how-to-replace-a-stereo-connector-and-salvage-audio-cables-and-headphones/ | |
http://www.instructables.com/id/Replacing-the-jack-on-a-pair-of-headphones/?ALLSTEPS | |
- | |
http://en.wikipedia.org/wiki/Phone_connector_(audio) | |
http://www.instructables.com/id/1-How-to-Repair-or-Fix-Headphones-Headphone-Jack/ | |
http://www.overclock.net/t/1388819/is-it-possible-to-fix-a-bent-headphone-jack | |
https://www.google.com/search?client=opera&q=Neutrik+make+some+nice+aftermarket+jacks.&sourceid=opera&ie=UTF-8&oe=UTF-8 |
This file contains hidden or 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
$x = false # This is a global variable | |
class MyBurger | |
TOPPING = "something" #this is a constant, always UPPERCASE | |
def order | |
number = "something" #this is a local variable, only accessible in this function. Usually | |
end | |
def initialize |
This file contains hidden or 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
3.times {puts 'Hello World'} | |
class BankAccount | |
def initialize(name) | |
@transactions = [] | |
@balance = 0 | |
end | |
def deposit |
This file contains hidden or 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 namer | |
puts "name?" | |
name=gets.chomp | |
puts "#{name.length} is length" | |
if name.length>25 | |
puts "Greater than 25" | |
end | |
end | |
namer() |
This file contains hidden or 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
.displayGroups { | |
display: flex; | |
justify-content:center; | |
margin: 0 20%; | |
height: auto; | |
width: auto; | |
/*margin-left: 30%;*/ | |
/*margin-right: auto;*/ | |
padding: 15px; | |
border-radius: 15px; |
This file contains hidden or 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 Desk(number, position, person, classroom){ | |
this.number = number; | |
this.position = position; | |
this.person = person; | |
this.classroom = classroom; | |
}; |
This file contains hidden or 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
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
This file contains hidden or 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 | |
# 1. export your RIL bookmarks | |
# 2. save this file to the same directory where your ril_export.html is | |
# 3. change username and password in the script bellow | |
# 4. run 'ruby ril_to_instapaper.rb' in terminal | |
require "cgi" | |
require "net/http" | |
require "net/https" |
This file contains hidden or 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
### Run this script via a cronjob every (every minute or so) on a server that has access to your dropbox. | |
### You must install youtube-dl (http://rg3.github.com/youtube-dl/) for this to work. | |
#!/bin/bash | |
QUEUE_DIR=~/Desktop/Dropbox/IFTTT/youtube-dl/*.txt | |
VIDEO_DIR=~/Desktop/Dropbox/youtube/ | |
shopt -s nullglob | |
for queue_file in $QUEUE_DIR | |
do | |
video_url=`cat "$queue_file"`; |
OlderNewer