3290 sudo sh ~/Downloads/cuda_10.0.130_410.48_linux.run
3291 tail -f /var/log/nvidia-installer.log
3292 lsmod | grep nouveau
3293 tail -f /var/log/nvidia-installer.log
3294 nvidia-detector
3295 lsmod | grep nouveau
3296 sudo sh ~/Downloads/cuda_10.0.130_410.48_linux.run
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
ffmpeg -re \ | |
# -re (input) | |
# Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss). By default ffmpeg attempts to read the input(s) as fast as possible. This option will slow down the reading of the input(s) to the native frame rate of the input(s). It is useful for real-time output (e.g. live streaming). | |
# (!) Turns out this will interrupt the stream by the audio input, making the output stream fps looks extremely low | |
-pix_fmt uyuv442 \ | |
-framerate 30 \ | |
-f avfoundation \ | |
# Pixel format & Framerate for FFMPEG-device: https://www.ffmpeg.org/ffmpeg-devices.html#avfoundation | |
-i "0" \ | |
# Use input "0" from avfoundation |
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
/** | |
* Draw an arrowhead on a line on an HTML5 canvas. | |
* | |
* Based almost entirely off of http://stackoverflow.com/a/36805543/281460 with some modifications | |
* for readability and ease of use. | |
* | |
* @param context The drawing context on which to put the arrowhead. | |
* @param from A point, specified as an object with 'x' and 'y' properties, where the arrow starts | |
* (not the arrowhead, the arrow itself). | |
* @param to A point, specified as an object with 'x' and 'y' properties, where the arrow ends |
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 duplicates = []; | |
db.staff.aggregate([ | |
{ $match: { | |
id: { "$exists": true } // discard selection criteria | |
}}, | |
{ $group: { | |
_id: { id: "$id"}, // can be grouped on multiple properties | |
dups: { "$addToSet": "$_id" }, | |
count: { "$sum": 1 } |
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
// Problem happens regardless of duration, but unless using | |
// the `.velocity-animating` CSS hack it is easier to see with longer durations. | |
const options = {duration: 1000, easing: 'easeInOutQuad'}; | |
export default function(){ | |
this.transition( | |
// this works | |
//this.use('fade') | |
// this has a glitch; can see second copy/ghost of modal in top left when closing |
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
import Controller from '@ember/controller'; | |
import EmberObject, { computed, action } from '@ember/object'; | |
let Person = EmberObject.extend({ | |
// these will be supplied by `create` | |
firstName: null, | |
lastName: null, | |
address: { | |
road: 'Northland', |
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 strict'; | |
const fs = Promise.promisifyAll(require('fs')); | |
const path = require('path'); | |
const crypto = require('crypto'); | |
const CronJob = require('cron').CronJob; | |
module.exports = class FlowUploader { | |
constructor(tempDir, uploadDir, maxFileSize, fileParameterName) { | |
this.tempDir = tempDir || './tmp'; |
https://www.reddit.com/r/vim/comments/7fqpny/slow_vim_scrolling_and_cursor_moving_in_iterm_and/
i guys, I'm desperate :c Just bought my new MacBook pro 2017 and was very happy with it for a while until I decided to configure my vim. On Linux vim works just fine, scrolling is always ok even with a much faster cursor speed than I have now on mac. But lately I spent a WHOLE day trying to figure out what's wrong with scrolling speed on mac. It drives me insane. Both terminal and iterm are extremely slow at rendering and even moving the cursor around without scrolling at all is laggy!
I think I tried almost all the possible suggestions including
setting ttyfast and lazyredraw
speeding up my key repeat to 1(scroll is faster but even more laggy)
If you ever need a mobile application, you probably have an API endpoint to talk to. And if you're doing it right, you should have different environment for your API, usually it'll be: dev, staging, production.
We dont' want to perform test againts the production API. We need a way to teach our app to talk to different API environment. But what is the switch?
The naive way:
NewerOlder