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
var adp = Titanium.API.Application.getDataPath(); | |
var dbpath = adp+"\\"+"sampledb.db"; | |
var db = Titanium.Database.openFile(dbpath); | |
db.execute('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, firstname VARCHAR(50), lastname VARCHAR(50))'); | |
var firstname = $("input#firstname").val(); | |
var lastname = $("input#lastname").val(); | |
db.execute("INSERT INTO users (firstname, lastname) VALUES (?, ?)", firstname, lastname); |
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 | |
} |
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
$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
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
@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
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
{ | |
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
// 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
<?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 { |
OlderNewer