Quantcast
Channel: User Pistos - Stack Overflow
Browsing all 43 articles
Browse latest View live

Comment by Pistos on Sails.js upgrade to v1 reverse case sensitive queries

Having a blanket "replace _id with id" seems to have a fairly high risk of replacing more than intended.

View Article



Comment by Pistos on Setting focus to the address bar using a firefox extension

urlbar doesn't seem to be present any more (Firefox 66).

View Article

Comment by Pistos on Scoped CSS not being applied within the component

Use /deep/ (including slashes) when using SCSS instead of plain CSS, because the SCSS parser doesn't handle >>>.

View Article

Comment by Pistos on dynamic keys for object literals in Javascript

Thank you for the edit about [expression]: value. It's just the thing that's needed.

View Article

Comment by Pistos on nativescript - how set global variables

You can also set these global.* variables from within your webpack.config.js with the webpack DefinePlugin.

View Article


Comment by Pistos on Get mac address and ip in Nativescript

Note that I also needed android.permission.CHANGE_WIFI_STATE in my manifest before this worked. I was getting java.lang.SecurityException: WifiService: Neither user 10909 nor current process has...

View Article

Comment by Pistos on How to fix a locale setting warning from Perl

Fellow Gentoo users: I followed the advice of commenting out the SendEnv line in /etc/ssh/ssh_config. See also the (polarized) discussion at bugs.gentoo.org/367017 .

View Article

Comment by Pistos on How can I use Ruby to parse a time as though it is in a...

It's absurd to me that plain Ruby doesn't have a means of doing this. It would be nice not to have to rely on a chunky Rails library/gem. Not sure why the tzinfo gem wouldn't provide a way to parse.

View Article


Comment by Pistos on PostgreSQL issue: could not access file...

Gentoo slotting was exactly my problem; thanks. Somehow the currently-running version was removed when a higher version (slot) was installed. Too bad someone else downvoted your answer -- probably due...

View Article


Comment by Pistos on Exclude a directory from git diff

This works for me without needing any . after the --. Just git diff [..arguments...] -- ':!thing-to-exclude'

View Article

Comment by Pistos on gem cannot access rubygems.org

This worked for me (after temporarily adding some IPs in /etc/hosts for api.rubygems.org and rubygems.org).

View Article

Comment by Pistos on Set cookie with ramaze framework?

Can't just use session data? ramaze.net/documentation/file.sessions.html

View Article

Comment by Pistos on ImportError: libgssapi_krb5.so.2: cannot open shared...

dev-python/gssapi for those of us on Gentoo.

View Article


Answer by Pistos for Should I require explicitly all dependencies in every file?

I place the requires in the very files that are using the things that are being required. This sections off your code into portable modules. You can move files among directories/namespaces, and you can...

View Article

Answer by Pistos for ffmpeg speed up video - Windows

Use both setpts and atempo to speed up both video and audio:ffmpeg -i input-video.mp4 -vf "setpts=0.68*PTS" -filter:a "atempo=1.467" output-video.mp4From:...

View Article


Rails i18n coverage

Is there a tool (or built-in way) to see if a given translation entry is no longer referenced? Even a "mechanical" way would be helpful, meaning something which runs the test suite and reports which...

View Article

How can I check from Ruby whether a process with a certain pid is running?

If there is more than one way, please list them. I only know of one, but I'm wondering if there is a cleaner, in-Ruby way.

View Article


rspec: expect method call on instance of EXACT class (not subclasses)

I have code which calls two slightly different things. One which instantiates Foo explicitly, and another which uses a gem which instantiates Foo internally (i.e. not my code).I am trying to...

View Article

How to configure an existing git repo to be shared by a UNIX group

I have an existing git repo (a bare one) which has up to this point only been writable by me. I want to open it up to some UNIX user group, foo, so that all members of foo can push to it. I'm aware...

View Article

Answer by Pistos for HTML canvas: Rotating and translating an image to fix a...

I got it working: https://codepen.io/anon/pen/KoeoxdTurns out no trigonometry was needed at all.function draw() { const scene = document.getElementById('canvas-scene') const ctx1 =...

View Article
Browsing all 43 articles
Browse latest View live




Latest Images