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
window.init_scrollbars = (pane, scrollbar) -> | |
content = pane.find(".conversation-scroll-content") | |
if pane.height() > content.height() | |
scrollbar.css("opacity", "0.3") | |
else | |
scrollbar_height = scrollbar.parent().height() - scrollbar.height() | |
scrollbar.draggable({ | |
containment: "parent", | |
axis: 'y', | |
drag: (event, ui) -> |
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
window.init_scrollbars = (pane, scrollbar) -> | |
content = pane.find(".conversation-scroll-content") | |
if pane.height() > content.height() | |
scrollbar.css("opacity", "0.3") | |
else | |
scrollbar.draggable({ | |
containment: "parent", | |
axis: 'y', | |
drag: (event, ui) -> | |
scrollbar_height = scrollbar.parent().height() - scrollbar.height() |
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 "net/http" | |
require "uri" | |
require "json" | |
module Postman | |
class MandrilAPI | |
@key = '' | |
@request = {} | |
@uri = '' |
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
sudo vi /etc/usbnount/usbmount.conf | |
... | |
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,rw" | |
... | |
remove sync flag and save the file | |
... |
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
@mixin placeholder-color($color) { | |
&::-webkit-input-placeholder { /* WebKit browsers */ | |
color: $color; | |
} | |
&:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ | |
color: $color; | |
} | |
&::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
color: $color; | |
} |
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
<?php | |
$con = mysql_connect("web02.sjc.netdna.com", "devel", "n3tdn@"); | |
if (!$con) die('Could not connect: ' . mysql_error()); | |
mysql_select_db("clients_test", $con); | |
// MUST Consider 100TB packages |
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
req = Net::HTTP::Post.new('/api/1.0/messages/send.json', initheader = {'Content-Type' =>'application/json'}) | |
req.body = @request.to_json | |
http = Net::HTTP.new(@uri.host, @uri.port) | |
http.use_ssl = true | |
response = http.start {|http| http.request(req) } | |
puts "Response #{response.code} #{response.message}: #{response.body}" | |
# => Response 500 Internal Server Error: {"status":"error","code":-100,"name":"GeneralError","message":"An unknown error occurred processing your request. Please try again later."} |
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 'spec_helper' | |
describe UsersController do | |
describe "User creation" do | |
it "should create a new user" do | |
@user = mock_model(User, | |
:email => '[email protected]', | |
:password => 'test', | |
:name => 'tester', |
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
foreach($values as $key=>$val) { | |
if (!isset($values[$key])) { | |
unset($values[$key]); | |
} | |
} |
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
#GET http://0.0.0.0:4567/thumb/https%3a%2f%2ftwimg0-a.akamaihd.net%2fprofile_images%2f1615677010%2f34214a75-4b21-46ae-89b4-2e44e356dc92_normal.png | |
#Sinatra doesn’t know this ditty. | |
#Try this: | |
#get '/thumb/https%3a/twimg0-a.akamaihd.net/profile_images/1615677010/34214a75-4b21-46ae-89b4-2e44e356dc92_normal.png' #do | |
# "Hello World" | |
#end | |
require 'sinatra' |