HOST=yournal.meteor.com
CMD=`meteor mongo $HOST --url | tail -1 | sed 's_mongodb://\([a-z0-9\-]*\):\([a-f0-9\-]*\)@\(.*\)/\(.*\)_mongodump -u \1 -p \2 -h \3 -d \4_'`
$CMD -o /path/to/dump
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); | |
var s; | |
function create() { | |
game.physics.setBoundsToWorld(true, true, true, false); | |
s = game.add.tileSprite(0, 0, 800, 600, 'starfield'); | |
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
<script> | |
/* another block */ | |
</script> | |
<script data-test-value="xyz"> | |
//http://stackoverflow.com/a/2954896 | |
// this works because the processing of script blocks is serial | |
// and others does not exist in that moment of execution. | |
// works with script-references | |
// does NOT work with async's | |
var toArray =Array.prototype.slice; |
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
using System.Web.Mvc; | |
/// <summary> | |
/// This model binder converts the value "on" to true. | |
/// It's necessary for form-checkboxes (bootstrap) that sends "on" instead a boolean value | |
/// </summary> | |
public class OnOffModelBinder : IModelBinder | |
{ | |
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) | |
{ |
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
if exists(select * from sys.procedures where name = 'test_proc') | |
begin | |
drop procedure test_proc | |
end | |
go | |
create procedure test_proc | |
@in int, | |
@out int output, | |
@inout int output |
removing meteor (usually not needed!)
# user settings
sudo rm /usr/local/bin/meteor
#meteor installation
rm -rf ~/.meteor
removing meteorite
To create a symbolic link, the syntax of the command is similar to a copy or move command: existing file first, destination file second. For example, to link the directory /export/space/common/archive to /archive for easy access, use:
ln -s /export/space/common/archive /archive
To link the runtime control script /etc/init.d/httpd to /etc/rc2.d/S77httpd, use:
cd /etc/rc2.d ln -s ../init.d/httpd S77httpd
copied from http://collidercreative.com/adding-custom-local-packages-to-meteor-with-meteorite/
##STEP 1: ADD PACKAGE PATH TO SMART.JSON FILE
To have Meteor load a local package you need to add the package and path to your smart.json file like so:
{
"packages": {
"font-awesome-4": {},
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
BEGIN TRY | |
... | |
END TRY | |
BEGIN CATCH | |
ROLLBACK TRANSACTION; | |
THROW; | |
END CATCH |
OlderNewer