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
Edit In Place | |
http://jsfiddle.net/timriley/9Wpyf/ | |
Using A Directive to Controller | |
Eg. Bind a click event of a div to delete a tweet | |
http://www.thinkster.io/angularjs/IgQdYAAt9V/angularjs-directives-talking-to-controllers | |
File Uploads (has link to example with S3) | |
Allows with drag n drop as well. | |
https://github.com/danialfarid/angular-file-upload |
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 | |
// Add to app/start/artisan.php | |
// Artisan::add(new MysqlDump); | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class MysqlDump extends Command { |
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
// First try loading jQuery from Google's CDN | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
// Fall back to a local copy of jQuery if the CDN fails | |
<script> | |
window.jQuery || document.write('<script src="http://mysite.com/jquery.min.js"><\/script>')) | |
</script> |
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
{ | |
companies: [ | |
{ | |
id: 1, | |
name: "Apple", | |
created_at: "0000-00-00 00:00:00", | |
updated_at: "0000-00-00 00:00:00", | |
people: [ | |
{ | |
id: 2, |
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 destroy_shopify_variant(variant_id) | |
ShopifyAPI::Variant.delete({ :id => variant_id }) | |
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
@mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
@if $inset { | |
-webkit-box-shadow:inset $top $left $blur $color; | |
-moz-box-shadow:inset $top $left $blur $color; | |
box-shadow:inset $top $left $blur $color; | |
} @else { | |
-webkit-box-shadow: $top $left $blur $color; | |
-moz-box-shadow: $top $left $blur $color; | |
box-shadow: $top $left $blur $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
Install the logger: http://craig.is/writing/chrome-logger | |
Put ChromePhp.php somewhere in your PHP include path | |
include 'ChromePhp.php'; | |
ChromePhp::log('Hello console!'); | |
ChromePhp::log($_SERVER); | |
ChromePhp::warn('something went wrong!'); | |
Ruby: https://github.com/cookrn/chrome_logger |
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
$csv_file = 'export-test.csv'; | |
ini_set("auto_detect_line_endings", true); // Needed for for some reason | |
$csvfile = fopen($csv_file,'rb'); | |
echo '<h3>Importing CSV File into system ...</h3>'; | |
while(!feof($csvfile)) { | |
$csvarray[] = fgetcsv($csvfile); | |
} |
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
# Heroku: bamboo-mri-1.9.2 -- I was trying Cedar to no avail as well. | |
# Heroku Bundler Version 1.0.7 | |
# Local Version is: ( Bundler version 1.1.0 ) not sure if this matters | |
# Error I am receiving: | |
# You have modified your Gemfile in development but did not check | |
# the resulting snapshot (Gemfile.lock) into version control | |
# | |
# You have added to the Gemfile: | |
# * libnotify |
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
try { | |
var adp = Titanium.API.Application.getDataPath(); | |
var dbpath = adp+"\\"+"sampledb.db"; | |
var db = Titanium.Database.openFile(dbpath); | |
//var db = Titanium.Database.open('recruitment'); // this doesn't work either | |
} | |
catch (e) { | |
alert(e); // seems to connect as this doesn't come up | |
} |