git status - list last modified date

git status - list last modified date

Using git, is it possible to list an unstaged file's last modified date alongside it's path? using eg. git statusorgit diff --name-only 1:Not directly but you can use a pipe:git status -s | while read mode file; do echo $mode $file $(sta

Error installing Bundler

Error installing Bundler

I am trying to install the Bundler gem on my Mac. With the command:sudo gem install bundler I get the following error:ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:Unable to download data from https://rubygems.org/ - SSL_

Which browsers send the expect: 100-continue header?

Which browsers send the expect: 100-continue header?

The HTTP/1.1 spec allows for clients to send an Expect: 100-continue header for large request payloads (8.2.3 Use of the 100 (Continue) Status - Hypertext Transfer Protocol -- HTTP/1.1 - RFC2616).This will pause the request after the header

MongoError,err:E11000 duplicate key error

MongoError,err:E11000 duplicate key error

I have a MongoDb schema like this var User = new Schema({ "UserName": { type: String, required: true }, "Email": { type: String, required: true, unique: true }, "UserType": { type: String }, "Password": { type: String }});I a

fabric appears to start apache2 but doesn't

fabric appears to start apache2 but doesn't

I'm using fabric to remotely start a micro aws server, install git and a git repository, adjust apache config and then restart the server.If at any point, from the fabfile I issue eithersudo('service apache2 restart') or run('sudo service a

Azure webjobs vs scheduler

Azure webjobs vs scheduler

A very simple question:Why would someone use the Azure Scheduler if Azure WebJobs are free?I couldnt find any topic regarding "azure webjobs vs azure scheduler"The main difference is that the webjob contains everything that the scheduler ca

Make R exit with non-zero status code

Make R exit with non-zero status code

I am looking for the R equivalent of linux/POSIX exit(n) which will halt the process with exit code n, signaling to a parent process that an error had occurred. Does R have such a facility? 1:It's an argument to quit(). See ?quit.Argum

JAVA using google speech recognition API

JAVA using google speech recognition API

I'm trying to use google speech recognition API. Here's the code i've written:http://pastebin.com/zJEhnJ74It works. I get an answer from the server:{"status":5,"id":"8803471b14a2310dfcf917754e8bd4a7-1","hypotheses":[]}Now the problem is "st

git ls-files sort by modification time

git ls-files sort by modification time

How can I list files sorted by their modification time? I want the git modification time, not the system modification time. For example, if I have a (committed) file README, thentouch READMEwill change the system modification time... but th

Best way to invoke Rest APIs from angularjs?

Best way to invoke Rest APIs from angularjs?

From where should REST API request be invoked from angular js?I.e. from controller, module, service, factory. I am totally confused that what should be the right way for it? 1:You can use either resources, or build services that impleme

What is the equivalent of jQuery ajax beforeSend in Angularjs?

What is the equivalent of jQuery ajax beforeSend in Angularjs?

I am familiar with Jquery AJAX call, which has different callbacks like beforeSend, success, complete, etc.This is the example AJAX call with Jquery:$.ajax({ url: 'register.php', type: 'POST', data: {name:name, email:email}, beforeSend:

How to do progress reporting using Async/Await

How to do progress reporting using Async/Await

suppose i have a list of files which i have to copy to web server using ftp related classes in c# project. here i want to use Async/Await feature and also want to show multiple progress bar for multiple file uploading at same time. each pro

Tracking build progress with TeamCity REST API

Tracking build progress with TeamCity REST API

I use the TeamCity (7.0) REST API to allow developers to trigger custom builds. I add the build to the queue like this:http://teamcity/httpAuth/action.html?add2Queue=[buildTypeId]&name=[propNam…]My question is how I best can track the progr

How to get public wall posts with the facebook API

How to get public wall posts with the facebook API

I m trying to get wall posts from a profile facebook. I have no problems with the fan pages and my user token is valid (at least for the fan pages).Example with this post : https://www.facebook.com/aurelia.filion/posts/10151342315613445As y

django - set user permissions when user is automatically created

django - set user permissions when user is automatically created

Django 1.5, python 2.6The model automatically creates a user under certain conditions:User.objects.get_or_create(username=new_user_name, is_staff=True) u = User.objects.get(username=new_user_name)u.set_password('temporary')In addition to se

Is there an equivalent apple-touch-startup-image for the IPAD?

Is there an equivalent apple-touch-startup-image for the IPAD?

For web apps you can set the startup screen with apple-touch-startup-imageWhat about for iPads? 1:I had the same issue as well... You need to you use a specific size of 1004*768. i explained it in this blog: http://www.amirnaor.com/?p=71

Adding Items to and Querying the iOS Keychain with Swift

Adding Items to and Querying the iOS Keychain with Swift

I'm having trouble converting all of the Objective C code samples that are available for adding data and querying data from the iOS Keychain into Swift. I'm trying to do a basic storage of a string (an access token) and reading it back. I'v

How can I determine what log configuration source Logback actually used?

How can I determine what log configuration source Logback actually used?

log4j has a property, log4j.debug, which will helpfully provide the user with an indication of which configuration file was actually used to configure the logging system.I haven't been able to find anything equivalent with the (otherwise su

How to set favicon.ico properly on vue.js webpack project?

How to set favicon.ico properly on vue.js webpack project?

I have created a vue webpack project using vue-cli.vue init webpack myprojectAnd then ran the project under dev mode:npm run devI got this error: Failed to load resource: the server responded with a status of 404 (Not Found) http://localho

ASP.NET MVC 4, throw HttpException vs return HttpStatusCodeResult?

ASP.NET MVC 4, throw HttpException vs return HttpStatusCodeResult?

I am developing a RESTful service and I want to return 400 for all unsupported URLs.My question is when should I choose method 1 over method 2 and vice-versa..//method 1public ActionResult Index(){ //The url is unsupported throw new H

Add a duration to a moment (moment.js)

Add a duration to a moment (moment.js)

Moment version: 2.0.0After reading the docs, I thought this would be straight-forward (Chrome console):var timestring1 = "2013-05-09T00:00:00Z";var timestring2 = "2013-05-09T02:00:00Z";var startdate = moment(timestring1);var expected_enddat

efficient bulk update rails database

efficient bulk update rails database

I'm trying to build a rake utility that will update my database every so often.This is the code I have so far:namespace :utils do # utils:update_ip # Downloads the file frim to the temp folder then unzips it in # Then updates the datab

Where do you do your validation? model, controller or view

Where do you do your validation? model, controller or view

Where do you put user input validation in a web form application?View: JavaScript client sideController: Server side language (C#...)Model: Database (stored procedures or dependencies) I think there is validation required by each level:Did

Shortcut for moving between Vim windows

Shortcut for moving between Vim windows

Let's say I have single Vim tab displaying 9 buffers (equally separated, like a table 3x3). Currently, to get from the top left window to the bottom right one, I have to press 3, Ctrl+W, J, and then 3, Ctrl+W, L. This is cumbersome and I

AVPlayerItem replaceCurrentItemWithPlayerItem Blocking

AVPlayerItem replaceCurrentItemWithPlayerItem Blocking

First a little context about the application... - There's a lot of heavy UI operation's involving video players (mostly scrolling) - The videos are dynamic and change based on our current page . - so the video's have to be dynamic and keep