recentpopularlog in
« earlier   later »
Vim - General - How to get vim patch version number in vim script?
As far as the patch level, the normal way to do it would be something along the lines of
<code class="language-viml">if v:version > 702 || (v:version == 702 && has('patch31'))</code>
which returns true if the vim binary is from the yet-unreleased 7.3 or higher, or if it's from vim 7.2 and includes patch 31.
viml  vimscript  vimrc  conditional  solution 
september 2019
brammool/libvterm: Mirror of http://bazaar.leonerd.org.uk/c/libvterm/
<code>To merge in changes from Github, do this:
- Commit any pending changes.
- Setup the merge tool:
git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false
- Run the merge tool:
git mergetool
This will open a four-way diff between:
LOCAL - your current version
BASE - version as it was at your last sync
REMOTE - version at head on Github
MERGED - best-effort merge of LOCAL and REMOTE
Now find places where automatic merge didn't work, they are marked with
<<<<<<<<, ======= and >>>>>>>
Fix those places in MERGED, remove the markers, and save the file :wqall.</code>
vim  devel  git  vimdiff  merging  merge  mergetool  tipsandtricks 
september 2019
ciaranm/securemodelines: A secure alternative to Vim modelines
This works fine, and it recognizes 'filetype', which is all I really need.
vim  security  plugin  modeline  solution 
september 2019
Can't install addon because it seems to be corrupt | Firefox Support Forum | Mozilla Support
In my case, I had a JavaScript syntax error (missing parenthesis) that prevented me from using 'about:debugging' to load the extension temporarily.
webdevel  firefox  webextension  extension  debugging  sortof  solution 
september 2019
Your first extension - Mozilla | MDN
On macOS 10.14 (Mojave), I had to
<code class="language-bash">
sudo port install nodejs10
sudo port install python27
sudo port select --set python2 python27


# install NPM modules into $HOME
npm config set prefix $HOME/.local/lib/node_modules
echo "export PATH=$HOME/.local/lib/node_modules/bin:$PATH" >> ~/.bash_profile

# this needed 'python2' in the PATH (for node-gyp, whatever that is)
npm install -g web-ext

# then build the extension
web-ext build
</code>

Also, try to use the linter on the built '.zip' file:

<code class="language-bash">addons-linter web-ext-artifacts/*.zip</code>

Otherwise you might get a "Can't install addon because it seems to be corrupt" error, which probably means that you just have a syntax error in your JavaScript, or else the manifest.json is missing a 'content_scripts' 'matches' key (ref: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts)
webdevel  firefox  extension  webextension  macos  errormessage  solution 
september 2019
What is the !! (not not) operator in JavaScript? - Stack Overflow
An easy way to describe it is: Boolean(5) === !!5; Same casting, fewer characters
devel  javascript  boolean  idiom  syntax  newbie  dammitbrain 
september 2019
3 from Hell movie review & film summary (2019) | Roger Ebert
Biggest use of 'Tremendous' you've ever seen, tremendous, tremendous tremendousness. People are saying yuge, yuge use of tremendous, trust me, bigly.

Oh boy! So they kidnapped the warden's wife. does she get raped? If she gets raped, how many times does she get raped? She has to at least get stripped naked. Oh boy, stripped at least! If she doesn't get raped, who does? Someone has to get raped, this IS a Rob Zombie movie! Raped and then like, stabbed 50 times or maybe run over by a truck! Oh boy this is going to be awesome! HARDCOOOOREE!
film  review  horror  schlock  forthecomments 
september 2019
Regarding shell scripts that are only meant to be source (SC2148) · Issue #581 · koalaman/shellcheck
Now (in 0.7.0 from MacPorts) I get POSIX 'sh' warnings, even though I've specified
<code class="language-bash"># shellcheck shell=bash</code>
shellcheck  bug  maybesolution 
september 2019
Directive · koalaman/shellcheck Wiki
For files without a shebang line:
<code class="language-bash"># shellcheck shell=bash</code>
shellcheck  bash  shellscripting  linting  staticanalyzer  directive  solution 
september 2019
shell - Unable to locate and replace an element with its classname using bash script? - Stack Overflow
The actual solution is
Clean it up into valid XHTML with tidy

I used
<code class="language-bash">tidy -f /dev/null -w 0 -n -q -asxhtml</code>
in a pipe to suppress all the extraneous warnings, and get XML that something like XMLStarlet could handle.
html  xhtml  xml  tidy  importexport  datamunging  solution  dammitbrain  fuckina 
september 2019
Converting Binary Plists - ForensicsWiki
<code class="language-bash">plutil -convert xml1 file.plist</code>
plist  propertylist  forensics  xml  macos  mac  solution 
september 2019
Fixing SSL CA certificates with OpenSSL from MacPorts - andatche.com
MacPorts now offers a Methode that syncs certificates from the system keychain:
<code class="language-bash">sudo port install certsync
sudo port load certsync</code>
As for the missing dependency, consider filing a bug.
openssl  macports  macos  ca  cacert  certificate  curl  maybesolution 
september 2019
Opinion | Meet the Man Behind Trump’s Biden Tweet - The New York Times
“The 30 second spots on TV aren’t the way to market anymore. The stuff online that people dismiss as memes — that’s the way to motivate people,” he added. “It’s the viral political marketing of the future.”

In theory, his story is a perfect realization of the utopian understanding of the utopian promise of the internet: a truly democratic system of communication where anyone, anywhere can create things and get them seen by important people — even the president!

But in keeping with our current political moment, that utopian vision is used for vapid, divisive ends. The reality, as we should all know by now, is darker and a whole lot dumber.
presidenttrump  memes  politics  misinformation 
september 2019
windows - Getting WGET to display a less verbose output - Super User
You can use -nv to make wget less verbose, but it won't show download progress in that case.


Or:
<code class="language-bash">wget -q --show-progress http://example.com</code>

--show-progress will override the "quiet" flag.


Also interesting:
<code class="language-bash">curl -#:</code>
wget  curl  progressbar  annoyance  downloading  spidering  webcrawling  maybesolution 
september 2019
json - xargs: how to have literal double-quotes in replacement? - Stack Overflow
GNU Parallel was built specifically to deal with xargs bad handling of special chars:
<code class="language-bash"><source parallel curl -X POST -H "application/json" myURL -d {}</code>
shellscripting  sysadmin  xargs  gnuparallel  quoting  woes 
september 2019
A (slightly) simpler command-line Spotlight search
Any qualified Spotlight query should be usable with "-interpret", so go ahead with
<code class="language-bash">mdfind -interpret "kind:image flash:1 modified:<=1/1/08 ex-girlfriend"</code>
to find those late-night pictures of last year's special someone.
macos  spotlight  metadata  mdfind  commandline  shellscripting  terminal  searchandindex  tipsandtricks  alternativeto  find 
september 2019
Spotlight Metadata Attributes
You can use these with 'mdfind', e.g., 'kMDItemKind == "Application"'.
mdfind  metadata  spotlight  macos  osx  devel  reference 
september 2019
macos - How to bring an application made in Automator to the foreground upon launch? - Ask Different
I used 'open -a' to run the application (from a shell script), instead of just running the binary from the Contents/MacOS directory directly.
macos  automator  windowmanagement  sortof  solution 
september 2019
Jobsworth - Wikipedia
A jobsworth is a person who uses their job description in a deliberately uncooperative way, or who seemingly delights in acting in an obstructive or unhelpful manner. The term can also be applied to those who uphold petty rules even at the expense of humanity or common sense.
bureaucracy 
september 2019
Right-click opens up terrifying vistas of reality and Windows 95 user's frightful position therein • The Register
He was therefore in a confident mood when a user waved at him, needing help.

The gentleman in question, recalled Anthony, "seemed to be doing OK, but he said he had a question…"

"See that Recycle Bin there, on the screen?" the user asked.

"Does someone come round and empty that?"

Anthony stared at him for a few seconds before carefully demonstrating the arcane art of the right-click.

He then slowly backed away, doubtless making a mental note to have a quiet word with whoever had dispensed the training.
oncall  it  usersupport  win95  humor 
september 2019
PuTTY semi-bug false-positive-malware
Our build setup does not involve Windows! As of 0.70, PuTTY's build process for Windows executables and installers goes from source code to digitally signed build produts entirely on Linux, without involving Windows or even WINE at any point. (We use clang-cl as a compiler, and run the WiX installer-constructor using Mono plus some home-grown glue code). So malware that runs on Windows would have a very difficult time attacking our build machine.
malware  putty  security  build 
september 2019
Is there a CSS selector for elements containing certain text? - Stack Overflow
Not possible without JavaScript
<code class="language-javascript">
// using jQuery
$('td:contains("male")')
</code>
css  selector  webdesign  webdevel  workaround  solution 
september 2019
macOS build fails by linker · Issue #82 · shundhammer/qdirstat
<code>/Applications/Developer/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/../Frameworks -o .app/Contents/MacOS/ -F/opt/local/libexec/qt5/lib -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.app/Contents/MacOS] Error 1
make: *** [sub-doc-make_first-ordered] Error 2</code>
build  compiler  errormessage  maybesolution  macos 
september 2019
shundhammer/qphotoview: Qt-based photo viewer that concentrates on what photographers need.
I like how salty this guy is about all the "other" Linux image viewers. Gave a shoutout to 'xv' though!
qt  photo  viewer  multimedia  photography  opensource  gui  needshelp 
september 2019
hard drive - Disk usage per user in Linux / Unix - Server Fault
<code class="language-bash">find . -type f -printf "%u %s\n" \
| awk '{user[$1]+=$2}; END{for(i in user) print i,user[i]}'</code>
diskusage  sysadmin  linux  unix  solution 
september 2019
find disk usage per user on a filesystem
<code class="language-bash">find / -printf "%u %s\n" \
| awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'</code>
bash  unix  sysadmin  diskusage  quota  storage  solution 
september 2019
« earlier      later »
per page:    204080120160

Copy this bookmark:





to read