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
# | |
# This is the way I configured my ruby environment on ArchLinux. | |
# | |
# I don't like the overhead of rvm, so I use chruby to switch between ruby versions. | |
# So first you need to install chruby from source: | |
# | |
# https://github.com/postmodern/chruby#install | |
# | |
# To build ruby from source I use ruby-build, so after chruby we install ruby-build: | |
# |
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
/** | |
* Pretty CSS "Stiched" look | |
* inspired by http://css-tricks.com/snippets/css/stitched-look/ | |
*/ | |
body { | |
margin: 0; | |
} | |
.text { |
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
/** | |
* Pretty CSS "Stiched" look | |
* inspired by http://css-tricks.com/snippets/css/stitched-look/ | |
*/ | |
body { | |
margin: 0; | |
} | |
.text { |
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
final ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
... | |
try { | |
wb.write(out); | |
} catch (final IOException e) { | |
throw new DocumentBuilderException(e); | |
} | |
return out.toByteArray(); | |
... |
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
// this doesn't work | |
final Locatable hoverItem = (Locatable) element; | |
final Mouse mouse = ((HasInputDevices) driver).getMouse(); | |
mouse.mouseMove(hoverItem.getCoordinates()); | |
// this doesn't work too | |
Actions builder = new Actions(driver); | |
builder.moveToElement(element).build().perform(); | |
// executing javascript doesn't work either. |
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
- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
NSCharacterSet *nonNumberSet = [[NSCharacterSet characterSetWithCharactersInString:@"0123456789."] invertedSet]; | |
BOOL result = NO; | |
if([string length] == 0){ //backspace | |
result = YES; | |
} | |
else{ |
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
# Rake task to copy local files to remote server via FTP | |
# required credentials.yml file, that contains keys: | |
# server, username, password | |
require "net/ftp" | |
require "yaml" | |
class FTPClient | |
attr_reader :remote_path |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; | |
} | |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; | |
font-family: "Arial Bold"; |
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
/** | |
* is there a css parent selector? the answer is: no. | |
*/ | |
$ul > li { | |
background: green; | |
} | |
body { |