php artisan migrate:make create_filmes_table --table=filmes --create
<?php
use Illuminate\Database\Schema\Blueprint;
var io = require('socket.io').listen(8000), | |
nicknames = {}; | |
io.sockets.on('connection', function (socket) { | |
socket.on('user message', function (msg) { | |
socket.broadcast.emit('user message', socket.nickname, msg); | |
}); | |
socket.on('nickname', function (nick, fn) { | |
if (nicknames[nick]) { |
This is how to resolve the following command line error message when pushing your app to Heroku:
~/Desktop/appname git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: 'heroku' does not appear to be a git repository
Please make sure you have the correct access rights and the repository exists.
The above error message appears because there's no remote named heroku. When you do a heroku create, if the git remote doesn't already exist, Heroku automatically creates one assuming you're in a git repo.
var db = mongoose.connect('mongodb://localhost:27017/DB'); | |
// In middleware | |
app.use(function (req, res, next) { | |
// action after response | |
var afterResponse = function() { | |
logger.info({req: req}, "End request"); | |
// any other clean ups |
'use strict'; | |
var should = require('should'); | |
var app = require('../../app'); | |
var request = require('supertest')(app); | |
describe('GET /api/incidents', function() { | |
it('should require authorization', function(done) { | |
request |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
#include <stdio.h> | |
#include <stdlib.h> | |
void mergesort(int *v, int n); | |
void sort(int *v, int *c, int i, int f); | |
void merge(int *v, int *c, int i, int m, int f); | |
int main (void) { | |
int i; | |
int v[8] = { -1, 7, -3, 11, 4, -2, 4, 8 }; |
#!/bin/bash | |
# Download GitKraken | |
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz | |
# copy the downloaded file into /opt directory | |
cp gitkraken-amd64.tar.gz /opt/ | |
cd /opt |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Example", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "node", | |
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], |
export const languages: ILanguage[] = [ | |
{ name: 'English' }, | |
{ name: 'French' }, | |
{ name: 'Spanish' }, | |
{ name: 'Russian' }, | |
// ... and others ... | |
]; |