README
All of the below notes come without any warranty, implied or explicit. YAYOR. The instructions worked on my OSX 10.8.5 box and may or may not work anywhere else. There may be omissions and typos. This is not a manual for anything, just a handy aide-mémoire, waschzettel, 備忘錄, cheat-sheet, you get the idea.
There are situations where you need to know just how many lines of text a given element on a web contains. This is surprisingly hard to do in browsers. There are lots and lots of suggestions for counting lines; a quick search turns up a long list:
There are also some libraries to do such things as typesetting in columns and shortening texts where knowledge about precise text dimensions is necessary, including
Most of these solutions rely on clever techniques to add and remove text, measure font metrics and doing clever CSS guesstimations. One of the most prevalent and promising techniques consists in somehow obtaining the height of a single line and then dividing the height of a DOM container with that value. In order for that to work, your lines be better all of the same height and the DOM metrics precise.
There is, however, a much more elegant and reliable solution that relies on the getClientRects()
method
of DOM nodes, as explained in https://developer.mozilla.org/en-US/docs/Web/API/Element/getClientRects.
At first, hwoever, the reader gets frustrated by the follwoing remark:
Originally, Microsoft intended this method to return a TextRectangle object for each line of text. However, the CSSOM working draft specifies that it returns a ClientRect for each border box.
Awww, snap. There's a surprising number of discussion on the web that stop consider getClientRects
at this
point, stating that "the solution will only work in IE". But, reading on, that's not quite true:
For an inline element, the two definitions are the same. But for a block element, Mozilla will return only a single rectangle.
Luckily, this cryptic message is better borne out by the accompanying illustration:
From this, it is a small step to arrive at what i currently the most elegant and reliable way to count
lines of text in a DOM block element as rendered by a given browser, namely: (1) wrap the contents
of the relevant block element(s) in an inline element (say, ...
); (2)
retrieve the DOM node(s) of this or those element(s); (3) call span.getClientRects().length
to
find the line count(s). Step (1) can easily done dynamically using jQuery's wrapInner()
method; sample
code:
var block_nodes = $( 'p' ); // or however you get your relevant block nodes
block_nodes.wrapInner( '' );
// Get line count for first `<p>` tag:
var line_counter = block_nodes.eq( 0 ).children( '.line-counter' )[ 1 ];
var line_count = line_counter.getClientRects().length;
My Acer Aspire E3-112 has a Broadcom 43142 chipset:
flow@enceladus ~/io $ lspci -vnn | grep -A 9 Network
02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)
Subsystem: Foxconn International, Inc. BCM43142 802.11b/g/n [105b:e07e]
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at 90600000 (64-bit, non-prefetchable) [size=32K]
Capabilities: <access denied>
Kernel driver in use: wl
Kernel modules: bcma, wl
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Acer Incorporated [ALI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1025:0933]
Unfortunately, some systems that I tried (Antergos, Debian, Linux Mint Cinnamon) did not configure
the device correctly; while BCM
did show up when running dmesg
, there was no entry for wireless in
the system tray.
A search revealed the following, which did work:
sudo apt-get --reinstall install bcmwl-kernel-source
Simply install the following package: sshfs, then add yourself to the fuse group:
sudo apt-get install sshfs
sudo gpasswd -a $USER fuse
!-- ################################################################################################### --
Update of Update To obtain the latest version of n
(0.2.14 as of this writing) which does include
support for io.js, simply do
npm install -g tj/n
With that version, n --help
will give you
Usage: n [options/env] [COMMAND] [args]
Environments:
n [COMMAND] [args] Uses default env (node)
n node [COMMAND] [args] Sets env as node
n io [COMMAND] Sets env as io
Commands:
n Output versions installed
n latest Install or activate the latest node release
n stable Install or activate the latest stable node release
n <version> Install node <version>
n use <version> [args ...] Execute node <version> with [args ...]
n bin <version> Output bin path for <version>
n rm <version ...> Remove the given version(s)
n prev Revert to the previously activated version
n --latest Output the latest node version available
n --stable Output the latest stable node version available
n ls Output the versions of node available
(iojs):
n io latest Install or activate the latest iojs release
n io stable Install or activate the latest stable iojs release
n io <version> Install iojs <version>
n io use <version> [args ...] Execute iojs <version> with [args ...]
n io bin <version> Output bin path for <version>
n io rm <version ...> Remove the given version(s)
n io --latest Output the latest iojs version available
n io --stable Output the latest stable iojs version available
n io ls Output the versions of iojs available
Options:
-V, --version Output current version of n
-h, --help Display help information
Aliases:
iojs io
which bin
use as
list ls
- rm
In order to install io.js, simply do
n io latest
or similar.
As of 2015-01-14, there are three open pull request to support io.js with n
(see https://github.com/tj/n/pulls?q=io).
I've forked and updated n
to implement PR 214, which you can get as
git clone https://github.com/loveencounterflow/n.git cd n make install After that, you can install iojs with
n --io v1.0.1
Please keep in mind that i will not update the repo so you're probably better off using the official n
repo; i'd fully expect the maintainers to implement iojs support within days. Also note that the author
of PR 214 warns that his fix "makes a weak assumption that nodejs and iojs versions don't collide"; given
the speed of NodeJS updates during the past year, i believe we can safely assume that we're weeks or months
away from any NodeJS 0.12.x release, let alone NodeJS 1.x.x, so PR 214 should be good enough for now.
npm@3
npm install -g npm@3
One great thing about NodeJS / iojs is that you can do a lot in plain JavaScript, meaning you get a high degree of portability with your software.
However, there is also quite a number of important modules like say, levelup
and fuse-bindings
, that need some C code to compile upon installation. This
can suck a lot when you have to use multiple versions of NodeJS at the same time;
for example, i'm using NodeJS 0.12.x for most things, but have some legacy stuff that
needs 0.10.x, and my NWJS app uses iojs v2.3.1, so i often have to switch versions.
Switching versions is easy when you use n
, but too often compilation steps will
fail. When you try to install a module and you get this error message:
gyp ERR! stack Error: 404 response downloading https://nodejs.org/dist/v2.4.0/node-v2.4.0.tar.gz
you know you're gyp
version is wrong. The easiest way to fix that is to use
node-gyp-install
:
npm install -g node-gyp-install
node-gyp-install
After that, re-try to npm install <whatever>
, and it should work!
You may have heard of io.js, a forward-thinking port of NodeJS. If you're on OSX then
downloading and opening the installer *.pkg
will greet you with a message saying that it will not only
install the iojs
binary, it will also symlink node
to iojs
. Depending on a lot of things you may or
may not want to take the risk. An unanswered question is how Node version managers will react to the
situation.
For sure to just try out io.js a virtual machine would be a better option, at least for the time being. And it's quite easy to do:
mkdir iojs
cd iojs
vagrant init ubuntu/trusty64
vagrant up
vagrant ssh
Next, avail yourself of the current iojs tar package; i did that using the browser on the host and putting
the iojs-v1.0.1-linux-x64.tar.xz
archive into the iojs
folder, which from inside the guest is
accessible as cd /vagrant
. From there, unpack files and issue four mv
moves:
sudo chown -R vagrant:vagrant /usr/local
cd /vagrant
tar xvfJ iojs-v1.0.1-linux-x64.tar.xz
mv /vagrant/iojs-v1.0.1-linux-x64/bin/iojs /usr/local/bin/
mv /vagrant/iojs-v1.0.1-linux-x64/bin/node /usr/local/bin/
mv /vagrant/iojs-v1.0.1-linux-x64/bin/npm /usr/local/bin/
mv /vagrant/iojs-v1.0.1-linux-x64/lib/node_modules /usr/local/lib/
That's it! Test it with, e.g.,
npm install -g coffee-script
As i said, this is a 'forward' thinking NodeJS fork, and indeed, we have generators without any command line
flag. From the coffee
REPL:
process.versions
# { http_parser: '2.3',
# node: '1.0.1',
# v8: '<IP_ADDRESS>',
# uv: '1.2.0',
# zlib: '1.2.8',
# ares: '1.10.0-DEV',
# modules: '42',
# openssl: '1.0.1k' }
g = -> yield 42
g().next()
# { value: 42, done: false }
!-- ################################################################################################### --
Grab an installer at https://www.vagrantup.com/downloads.html and run it. Then, create a folder of your
liking (which i chose to call drifter
) which will both hold the Vagrantfile
that captures the
setup of one specific VM and acts as the synced (shared) folder that allows simple data exchange between
guest and host. From the terminal, cd
into that folder, choose a VM name from https://vagrantcloud.com/
and install everything (which should take a minute or two).
NOTE you may want to have a look at sections Create a Mapped Port and
Enabling NFS for Synced (a.k.a. Shared) Folder, below, to
learn how to modify Vagrantfile
before you do your first vagrant up
(which will do the installation step;
vagrant init
just provides the configuration files). Remember that when you get asked for a password,
that is your password on the host—you never need a password on the guest (unless you somehow configure
Vagrant for that).
mkdir drifter
cd drifter
vagrant init ubuntu/trusty64
vagrant up
vagrant ssh
The most easiest way to get those elusive guest additions:
vagrant init debian/jessie64
vagrant box update
vagrant plugin install vagrant-vbguest
vagrant halt
vagrant up
vagrant ssh
node
, n
, Own Your FilesHere's the painlessest way that i'm aware of to get no less than:
node
installed, withn
, a very decent Node Version Manager, andsudo
to install dependencies and set a few
filesystem rights; from there on, npm install -g ...
will work without sudo
.sudo apt-get install git build-essential htop make
git clone https://github.com/visionmedia/n
cd n
sudo chown -R vagrant:vagrant /usr/local
make install
n latest
n stable
# or e.g.
n 5.12.0
npm install -g npm coffee-script doctoc
## now we have two Node versions and can use `npm`:
npm install -g whatever
First written as experience report as https://github.com/slap-editor/slap/issues/228
slap is a Sublime-like
editor that runs in the terminal; I first found myself unable to install
it properly until I found out my NodeJS installation—more specifically: my global
modules folder—was kind of borked. The following contains some advice for NodeJS
nಠಠbs and everyone who experiences failure when trying to npm install -g
something.
1: Install NodeJS
First of all, slap appears to be compatible (so far) with the newest NodeJS (v5 as of this writing). To me, the painlessest way to get the newest versions of Nodejs, npm
and n
(NodeJS version management, highly recommended) is to follow the outline in my how-to; roughly, clone n
, build it, and use it once to get the newest NodeJS (should come with npm
v3):
git clone https://github.com/visionmedia/n
cd n
sudo chown -R <user>:<user> /usr/local
make install
n latest
n stable
I write this because people always ask how to best install NodeJS. Debianists and Ubuntuers don't let their friends install NodeJS with apt-get
—that will get you an outdated version, naming conflicts, insane file rights setups, what have you.
2: Cleanup Global NPM Modules
This one's a biggy: In case you've been running NodeJS for as long as I have, you'll likely have ooogles of global modules installed over the years. Given the fast evolution of both Node and npm
, there's bound to be some bit rot, so it's time to clear up that space. I was unable to install slap and got all kinds of weird errors until I resolved to manually remove my ~/npm/lib/node_modules
folder (actually I renamed it for reference and created a new node_modules
).
3: Install slap
The official slap docs recommend to sudo npm install -g slap@latest
. Not sure whether that sudo
gives you important stuff that you don't get without (readers please fill me out on that one), but, generally speaking, the majority of people living on planet NodeJS prefer user-owned installs, user-owned /usr/local
directories, and so on. This also happens to be the way of homebrew
, and is generally considered A Good Idea. For this reason, i just did
npm install -g slap
which appears to work. Again, not sure what slap@latest
gives you that you don't get without it; most of the time, you don't add version markers to npm install
.
It may occur that some
package.json
does specify an outdated version which will inadvertently keep you from upgrading to the next major version of some package. That shouldn't happen here (not quite sure: do get global packages an entry in a globalpackage.json
?) but just to stay on the safe side, you can alwaysnpm uninstall --save xxx && npm install --save xxx
a package to obtain the latest version (the--save
switch produces a suitable entry in the package'spackage.json
), even across major versions (yes yes I know there are simpler ways but this one is really obvious and memorable).
I can strongly recommend to npm install -g npm-check
, which will give you the greatest way to control npm
dependencies. npm-check -u
gives you an interactive prompt for project-local files (with list selection! and install-now option!!); npm-check -u -g
does the same for global modules (including slap and, behold, npm
itself!!).
yield
As of 2015-01-29, CoffeeScript v1.9.1 has generators / yield
support baked right into the
mainstream distribution, meaning whereever you npm install coffee-script
, you wild get
support for this exciting feature (of course, provided your JS VM also supports it).
For the details, have a look at
https://github.com/jashkenas/coffeescript/compare/1.8.0...1.9.0
or
http://coffeescript.org/#changelog.
As of this writing, CoffeeScript is at 1.8.0 and comes without (obvious) support for
the yield
keyword (have a look at my outdated patch i dubbed CoffyScript;
the readme is a quite detailed explanation of generators and what you can do with them to get much nicer
ways to cope with asynchronicity in JavaScript.)
The great folks over there at CS have managed to get yield
support into CoffeeScript, but it's still
hidden behind a not-obvious installation trick; all you have to do is
...
With that version of CS installed, you can now try this:
g = ->
yield 42
yield 108
f = g()
log f.next()
log f.next()
log f.next()
While this does not look like anything useful on first sight, it opens a whole new world of possibilities
for some very important classes of problems. Again, head over to the readme mentioned above and don't forget
it's obsolete and in need of a re-write; you should be able to run everything, but avoid the star when
using CoffeeScript (it's implicit now. Update code samples corrected, but it still shows up in the text).
Also, remember to run your scripts with node --harmony ...
(as of NodeJS 0.11.14).
If you plan to run a server of whatever kind inside your shiny new Vagrant VM, you probably also want to
make that server visible from the host. One to accomplish that is to set up a forwarded port. Let's open
the host's Vagrantfile
in an editor to do that:
cd drifter
open -t ./Vagrantfile
In the Vagrantfile, look for an outcommented line like the below, uncomment it and choose the appropriate settings. In my case, i chose to map the guest's port 3000 to the same port on the host, so i can run the same software in the host or in the VM. Keep in mind though that a VM with such a setting running in the background will cause host applications trying to offer connectivity on that very port to fail (more or less) silently.
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 3000, host: 3000
My use case for setting up a Vagrant VM is that i want to use NodeJS 0.11.x as much as possible, as it
offers generators when started with the --harmony
switch. Unfortunately, you can't at this time (December,
2014) npm install level
under NodeJS > 0.10.x, so it's going to be difficult if your whole application
relies on new-fangled stuff like yield
.
Fortunately, though, setting up VMs has become very fast and straightforward, and networking (think bi-directional WebSockets) has evolved a lot, so you can always create a separate environment with bespoke dependencies, and this is exactly what i need.
At some point when i hoped i had everything up and running:
n 0.10.35
; NodeJS correct version? Check!npm install level
; LevelDB binaries compiled? Check!require 'level'; db = level '../data/mydb'
; LevelDB instance fine? Check!db.put key, value ( error ) -> ...
. OAWH:OpenError: IO error: ./users.db/MANIFEST-000001: Invalid argument
Turns out the underlying VirtualBox implementation has known issues with mmap
ped files that LevelDB
relies on. Fortunately, there's a workaround: use an NFS (Network File System) share.
On the host, try sudo nfsd status
; you should see an output like
nfsd service is enabled
nfsd is running (pid 2140, 8 threads)
You may have to sudo nfsd enable
, and/or sudo touch /etc/exports
, and/or sudo nfsd start
, and/or
reboot to get the NFS demon to run.
Note that Vagrant may try to access /etc/exports
when starting up; if you started without
sudo
, you will be asked to enter your password. That's your user password on the host, not the one
on the guest (which you do not know, as all authentication on the guest is done implicitly).
Then, in the Vagrantfile
, look for the below settings and edit them; i chose to overwrite the existing
setting in the first case (so i get an NFS share for the standard shared folder, which is
the folder the Vagrantfile
resides in on the host, and /vagrant
on the guest), and to use the default
suggestion for the second case.
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/vagrant", type: "nfs"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "<IP_ADDRESS>"
Details for this step were gleaned from https://github.com/rvagg/node-levelup/issues/222, http://qiita.com/yashikawa/items/b7a7d1a671106cd1a78a, and http://community.spiceworks.com/how_to/show/61136-how-to-create-an-nfs-share-on-mac-os-x-snow-leopard-and-mount-automatically-during-startup-from-another-mac.
command 2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
1494 sudo apt-get install smartmontools
1495 sudo smartctl -a /dev/
1496 df
1497 sudo smartctl -a /dev/sda1
1498 sudo smartctl -a /dev/sda1 | grep "Load_Cycle_Count"
1499 sudo smartctl -a /dev/sda | grep "Load_Cycle_Count"
1500 cat /etc/acpi/asus-wireless.sh
1501 l /etc/acpi/
1502 laptop_mode
1503 hdparm -B 255 /dev/sda
1504 sudo hdparm -B 255 /dev/sda
1505 sudo hdparm -B 254 /dev/sda
1506 sudo smartctl -a /dev/sda | grep "Load_Cycle_Count"
1507 echo `sudo smartctl -a /dev/sda | grep Load_Cycle_Count` " | " `date` >> ~/temp/load_count.txt
1508 cat ~/temp/load_count.txt
While there's a lot of software that you can and should install on Debianish / Ubuntish systems, there's also a number of software titles you should definitely not install that way; examples include
NodeJS, which will always be outdated when installed via apt
, will get
the wrong name (nodejs
instead of node
), and will not give you the opportunity
to just-so switch between versions as you can with n
or nvm
;
Open/LibreOffice; as I argue in the Readme about Writing macros for LibreOffice with Coffeescript, OpenOffice in Ubuntu is annoyingly broken and somewhat hard to replace with a reasonable LibreOffice installation;
and, sadly, TeX Live. Turns out while you can choose between a 'basic' and a 'full'
installation of TeX Live using apt-get
, neither will be 'as full' as the one
that'd get with the official TeX Live download. Case in point: a command like
tlmgr info xcolor
is going to fail miserably with an apt
installation
of TeX Live, and there seems to be no easy way to fix that.
I recommend using https://github.com/scottkosty/install-tl-ubuntu instead; you can just clone
the repo to some tmp
location and run the install script with sudo ./install-tl-ubuntu
,
very simple.
!-- ################################################################################################### --
You use NodeJS streams and pipes to read data from a database; let's assume you have a collection of flight
connection data and want to sort by price, show up to 10 connections, and exclude all flights the are priced
above a certain limit
. In principle, your setup could look similar to this:
( db.create_readstream query )
.pipe filter ( id, price ) -> return price < limit
.pipe sort_by_price_ascending
.pipe at_most 10
.pipe output
The way we have set up things means output
will contain a list of up to 10 flight IDs and prices, sorted
with the cheapest flights first. That's fine, but also a little spartanic. Luckily, you've got a stream
transformer find_details
that will take a flight ID, send a request to the database or a website to fill
out the many pertinent details that people want to know before booking. You stick that transformer into
your pipeline and are (...almost) good to go:
( db.create_readstream query )
.pipe filter ( id, price ) -> return price < limit
.pipe sort_by_price_ascending
.pipe at_most 10
.pipe find_details
.pipe output
Unfortunately, since DB and HTTP requests are inherently asynchronous in NodeJS, this means you just destroyed the ordering of your results. In this case it wouldn't be a big deal, since we'd only have to resort a dozen pieces, but in the actual use case that this model use case is based on i had tens of thousands of data items. My workaround was to cache the responses of the details query in a list, and when the stream signalled it was done, i sorted the list and re-sent each item one by one.
This is not only annoying from a theoretical point of view (ideally, streams should manage pieces one by one and avoid buffering where possible), it also means more memory consumption and poorer performance. And it entails you'll have to look for yet another workaround if the amount of data to be processed should ever outgrow available RAM. Can't we make it so that the pieces of data in the stream somehow keep the order in which the requests got sent, not the order in which the responses arrived?
So i thought about building a list structure—a queue—of requests that i would then match with asynchronous responses as they come in; whenever the oldest item in the request queue gets matched with an item in the response queue, then sending the response into the stream and deleting request and response from their queues would be safe. Less buffering, ordering preserved. Yay.
Turns out this functionality is already available as highland.js/parallel:
_ = require 'highland'
concurrency = 5
_ ( db.create_readstream query )
.pipe filter ( id, price ) -> return price < limit
.pipe sort_by_price_ascending
.pipe at_most 10
.map find_details
.parallel concurrency # send up to 5 requests at the same time
.pipe output
The key here is to use Highland's map
and parallel
stream methods in tandem.
brew install zeromq
This will give you a ZMQ version 4 installation (as of early 2015).
# thx to http://askubuntu.com/a/388770/13669
sudo add-apt-repository ppa:chris-lea/zeromq
sudo apt-get update
sudo apt-get install libzmq3-dbg libzmq3-dev libzmq3
Debian:
sudo apt-get install python-software-properties
https://packages.debian.org/sid/libzmq3-dev
Annoyingly, Firefox uses 'linear' tab switching be default, meaning
that when you ctrl+tab
to another tab and then ctrl+tab
again,
you'll not get back to to the original tab but to the next tab in the
row. You can fix that by going to about:config
(type it into the
address bar), then searching for the entry browser.ctrlTab.previews
(typing ctrlt
into the search field does it). Double-click that entry
to change it to true
.
(thx to https://alexyv.wordpress.com/2014/01/09/firefox-switching-between-tabs-in-mru-order/)
find / -type d -iname '*keyboard*' | less -SNR -#19
HtTrack is a great tool but it doesn't take kindly
to Archive.Org's' URL structure. The problem is that
(1) whenever the WayBack Machine crawls a website and makes a snapshot, that
snapshot will only include URLs that are different from the last snapshot; (2)
those changed addresses will be made accessible to the world under a URL that
starts with https://web.archive.org/web/, then has a timestamp looking like
20160907003604
, followed by the mirrored site's URL.
When you click your way through the mirrored site, you will often jump between timestamps. Now you can use HtTrack with wildcards, like so:
httrack https://web.archive.org/web/*/http://example.com/index.cfm --robots=N --max-rate=3000
and this does work in principle, but what you'll get is a long, looooong list of timestamped folders with tiny bits of data in each one, which makes it almost impossible to use.
thx to http://superuser.com/a/957298
Use Wayback_Machine_Downloader instead:
# what i did to ensure my ruby is v2+:
# echo $PATH
# export PATH=/Users/flow/bin:$PATH
# cd ~/bin
# ln -s /usr/local/bin/ruby
# which ruby
# ruby -v
gem install wayback_machine_downloader
cd example-com/
wayback_machine_downloader --to<PHONE_NUMBER>0000 http://example.com
Open Seahorse Password and Keyring manager, create a new keyring without a password, make it the default.
See http://askubuntu.com/a/735463
This is the best on-screen keyboard I've seen so far:
sudo apt-get install onboard
onboard-settings
onboard
Unfortunately, the sources are hosted on launchpad, which is a horrible site that makes SourceForge look great and accessible, if you ask me. I did manage to fork the sources using git-remote-bzr, and you know what, without doing anything else I can now at least look inside the code just so, online, and peruse the sources for hints on usage, or maybe there's even an official documentation? Wait, big parts (75%) of onboard are written in Python? You couldn't have guessed that much from clicking through the launchpad repo pages for hours.
https://github.com/felipec/git-remote-bzr
sudo apt-get install bzr
wget https://raw.github.com/felipec/git-remote-bzr/master/git-remote-bzr -O ~/bin/git-remote-bzr
chmod +x ~/bin/git-remote-bzr
git clone "bzr::lp:ubuntu/hello"
A clone of the onboard LaunchPad Bazaar repo is available as a git repo under https://github.com/loveencounterflow/onboard.
To toggle the keyboard, execute this command line:
dbus-send --type=method_call --print-reply --dest=org.onboard.Onboard /org/onboard/Onboard/Keyboard org.onboard.Onboard.Keyboard.ToggleVisible
I put the above line into my Linux Mint / Preferences / Keyboard / Shortcuts / Custom Shortcuts settings
(and bound it to the pretty much unused pause
key), so now I can toggle the keyboard with a single
keystroke.
http://www.heise.de/newsticker/meldung/Patch-stabilisiert-Linux-auf-Atom-Celerons-3337456.html
The intel_idle.max_cstate boot parameter refers to enumeration done by the linux kernel (number in column State) and not to the Intel notation of core states C0, C1, C2, C3, C6, C7, etc. Latency, Residency, and Time units are microseconds.
~/bin ► ./cstateInfo.sh
cpu0 State Name Disabled Latency Residency Time Usage
0 POLL 0 0 0 15750446 7676
1 C1-BYT 0 1 1 187784220 506757
2 C6N-BYT 0<PHONE_NUMBER>30057 374376
3 C6S-BYT 0<PHONE_NUMBER>966391 1864384
4 C7-BYT 0 1200 4000<PHONE_NUMBER> 832033
5 C7S-BYT 0 10000 20000<PHONE_NUMBER>1 324992
cpu1 State Name Disabled Latency Residency Time Usage
0 POLL 0 0 0 24124917 8885
1 C1-BYT 0 1 1 225946256 697915
2 C6N-BYT 0<PHONE_NUMBER>57953 470276
3 C6S-BYT 0<PHONE_NUMBER>333192 2017181
4 C7-BYT 0 1200 4000<PHONE_NUMBER>9 1025444
5 C7S-BYT 0 10000 20000<PHONE_NUMBER>9 387377
cpu2 State Name Disabled Latency Residency Time Usage
0 POLL 0 0 0 33569810 21979
1 C1-BYT 0 1 1 442760166 785786
2 C6N-BYT 0<PHONE_NUMBER>97919 524631
3 C6S-BYT 0<PHONE_NUMBER>672467 1941720
4 C7-BYT 0 1200 4000<PHONE_NUMBER> 598363
5 C7S-BYT 0 10000 20000<PHONE_NUMBER>3 339007
cpu3 State Name Disabled Latency Residency Time Usage
0 POLL 0 0 0 54960543 29888
1 C1-BYT 0 1 1 539278855 907380
2 C6N-BYT 0<PHONE_NUMBER>57299 587530
3 C6S-BYT 0<PHONE_NUMBER>241789 1975537
4 C7-BYT 0 1200 4000<PHONE_NUMBER> 559788
5 C7S-BYT 0 10000 20000<PHONE_NUMBER>6 331348
The Linux kernel enumerates the states for the J1900 as follows:
- 0 POLL
- 1 C1-BYT
- 2 C6N-BYT
- 3 C6S-BYT
- 4 C7-BYT
- 5 C7S-BYT
The parameter intel_idle.max_cstate refers to that enumeration and does NOT conform to the Intel notation of the C-states (which confused me):
So "intel_idle.max_cstate=2" means POLL, C1-BYT, and C6N-BYT (the first of the intel C6 states) are enabled and all other states (C6S-BYT, C7-BYT, C7S-BYT) are disabled and CANNOT be enabled after boot time.
Fortunately the /sys interface of the kernel allows fine-grained tweeking at run-time and one can turn off and on the the states individually (if not disabled at boot time via intel_idle.max_cstate=number).
In order to investigate whether erratum VLP52 is the root cause for this kernel bug (109051) I attached two shell scripts to this bug.
The first (c6off+c7on.sh) will disable all intel C6 core states for Baytrail processors (C6N-BYT and C6S-BYT) + enable all C7 core states (C7-BYT and C7S-BYT).
The second script can be used to verify that the C6 states are disabled (column "Disabled" should show a "1" for the disabled states and the count for the columns "Time" and "Usage" should not change any longer for the disabled C6*-BYT states).
The "c6off+c7on.sh" script should be started at system boot and if erratum VLP52 is the root cause of this bug then Baytrail systems with the processors mentioned in https://bugzilla.kernel.org/show_bug.cgi?id=109051#c425 (J2850, J1850, J1750, N3510, N2810, N2805, N2910, N3520, N2920, N2820, N2806, N2815, J2900, J1900, J1800, N3530, N2930, N2830, N2807, N3540, N2940, N2840, N2808) should run stably again. Especially Baytrail based systems with low average load (e.g. tablets and notebooks) should consume considerably less power with enabled C7*-BYT states.
In /etc/rc.local
:
[...]
/home/flow/bin/c6off+c7on.sh || exit 1
exit 0
# e.g. in ~/.bashrc or on the command line:
# just to see whether https://github.com/loveencounterflow/how-to#bay-trail-chips-linux-atom-celerons
# worked:
cstateInfo.sh
Do
less /proc/cpuinfo
to find out whether your CPU matches any of these possibly affected Intel® Processors: * Atom™ E3805 * Atom™ E3815 * Atom™ E3825 * Atom™ E3826 * Atom™ E3827 * Atom™ E3845 * Atom™ Z3735D * Atom™ Z3735E * Atom™ Z3735F * Atom™ Z3735G * Atom™ Z3736F * Atom™ Z3736G * Atom™ Z3740 * Atom™ Z3740D * Atom™ Z3745 * Atom™ Z3745D * Atom™ Z3770 * Atom™ Z3770D * Atom™ Z3775 * Atom™ Z3775D * Atom™ Z3785 * Atom™ Z3795 * Celeron® J1750 * Celeron® J1800 * Celeron® J1850 * Celeron® J1900 * Celeron® N2805 * Celeron® N2806 * Celeron® N2807 * Celeron® N2808 * Celeron® N2810 * Celeron® N2815 * Celeron® N2820 * Celeron® N2830 * Celeron® N2840 * Celeron® N2910 * Celeron® N2920 * Celeron® N2930 * Celeron® N2940 * Pentium® A1020 * Pentium® J2850 * Pentium® J2900 * Pentium® N3510 * Pentium® N3520 * Pentium® N3530 * Pentium® N3540


Cocktail of the week: Meraki Bar’s Apollo belvedere
by Athanasios ArgyrisAn espresso martini with a lovely, orangey twist
Everyone likes an espresso martini, and this orange-flavoured version is a neat little twist on the original.
Apollo belvedere
Serves 1
50ml good-quality vodka – we use Belvedere
25ml coffee liqueur – we use Kahlúa
10ml triple sec – De Kuyper or Cointreau are both fine
20ml fresh orange juice
5ml simple 1:1 sugar syrup (optional)
1 shot espresso, cooled
1 twist orange peel, to garnish
Put all the liquids in a shaker, add a big handful of ice and shake hard for seven to 10 seconds.
Double strain into a chilled martini glass or coupette, garnish with orange peel and enjoy.
• Athanasios Argyris, head mixologist, Meraki Bar, London W1.


How I Have Learnt EmberJS
Since two months I come using EmberJS full. We decided to use EmberJS without strong experience and knowledge. We might use another MV JS framework out there, but We are convinced that using a MV JS framework is the right path to follow in order to avoid have a bunch of JS code unmaintainable.
Besides the kind of app we are developing EmberJS made a perfect match for us.
When I’m into any technology, I follow closely the info stream about it. Yesterday I read this tweet:
Looking to use some Christmas money on #EmberJS learning material. Any recommendations? cc: @tomdale @wycats
That tweet made me think about how I have learnt EmberJS, which is unusual due to way how EmbjerJS is being developed.
EmberJS team core follows an aggressive development strategy until the next release, which consists on every six weeks a new stable version of EmberJS.
When you are trying to learn something new for a real project, often you get books, screencast, blog posts and so on in order to ramp up quickly. The problem here EmberJS with its development model tends to get out of date these resources as quick as six-weeks.
So, You can buy amazing books, read incredible tutorials, watch helpful screenshot, but they might going out of date on next release of EmberJS, definitely that’s not good. It’s very frustrating :–(.
What we did a custom algorithm to sort out this one in order to get good books for reference and get in touch with the official doc.
Might you asking yourself, how works this?
Well, We wanted to have good books with very recent date, in which we get reference to understand more in deep core concepts behind EmberJS and official doc to check out if the book, tutorial, etc is up-to-date. By this way We can take advantage the power of any OSS, its Community.
EmberJS is a good framework with amazing community, besides the core team are guys which know a lot of about OSS.
If you are interested on using Ember JS on your projects keep in mind its development life cycle and when you want to buy or read resource check out the release date and version used. There are many projects out there using EmberJS for real and not just tutorials.
We are using it for real and so far so good.


{% include 'header.html' %}
This project, SSHRanking, is just a fun way to be able to play with: SQLAlchemy, jinja2, flask and python.
the first script, sshrank.py has two flags:
server# ./sshrank.py -h root usage: sshrank.py [-h] [-f FIRSTRUN] [-w WATCH] optional arguments: -h, --help show this help message and exit -f FIRSTRUN set first run(default off), do -f on -w WATCH set to start watching (default off), do -w on
normally you're going to want to run it as 'sshrank.py -f on -w on' so it'll scan all the auth.log files and drop into watching auth.log for new attempts.
This takes everything from /var/log/auth.log* and tosses into a DB (I use mysql, but SQLAlchemy should make it easy for you to change that)
then theres ./rdnsthings.py which has no flags, you just run it and it updates rdns info for the IPs.
next you can show the data easily on the cli with ./outputdata.py
ouputdata.py still needs to be updated so it shows rdns, and ability to select date rage
% ./outputdata.py <IP_ADDRESS> attempted 45053 Last Attempt: 2013-10-03 13:51:13 times with users: root:1244, admin:105, apache:94, Tsai:40, user:35, kim:32, vincent:31, linda:30, laura:30, julia:30, <IP_ADDRESS> attempted 6193 Last Attempt: 2013-10-11 16:10:52 times with users: root:4871, ftpuser:70, admin:62, test:50, svn:40, www-data:36, user:34, www:30, teamspeak:28, oracle:24, <IP_ADDRESS> attempted 2278 Last Attempt: 2013-10-31 13:52:47 times with users: buttfart:548, chickenfucker:485, cockmonster:483, dumpsterslut:483, tittysprinkles:276, <script>alert(xss)<, <IP_ADDRESS> attempted 1318 Last Attempt: 2013-10-18 12:14:41 times with users: root:451, lady:9, testuser:3, greg:3, aaron:3, trinity:3, live:2, oracle:2, dummy:2, arno:2, <IP_ADDRESS> attempted 1144 Last Attempt: 2013-10-25 13:57:44 times with users: root:841, test:224, test1:24, hirata:14, tamada:13, satoshi:10, nakae:9, schwarze:9,a {% include 'footer.html' %}


OpenMPController: Control Number of OpenMP Threads Dynamically
The OpenMPController package provides a function omp_set_num_threads()
to set the number of OpenMP threads to be used.
This may be useful, for example, when linking against a vendor
optimised BLAS/LAPACK library (e.g. the AMD Core Math
Library), since the defaults used by those libraries may not
be highly performant.
| Version: |
0.2-5 |
| Depends: |
R (≥ 3.4.1) |
| Published: |
2017-12-11 |
| Author: |
Simon Guest |
| Maintainer: |
Simon Guest <simon.guest at tesujimath.org> |
| License: |
GPL-2 |
| NeedsCompilation: |
yes |
| Materials: |
README |
| CRAN checks: |
OpenMPController results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=OpenMPController
to link to this page.


Review: STILL CRAZY
Starring: Stephen Rea, Billy Connolly, Jimmy Nail, Timothy Spall, Bill Nighy, Juliet Aubrey, Helena Bergstrom, Hans Matheson, Bruce Robinson
Directed by: Brian Gibson
Review by: Joy Wyse, the SILVER Screen Critic
Over twenty years ago, when a fictional 70's rock band, Strange Fruit, disbanded, part of their problem had been in determining which one was the `star'. A combination of ego, booze, drugs and sex had led to their downfall, assisted by a lightning bolt from God himself.
Still Crazy is a good example of an ensemble working together. Top billing goes to Stephen Rea as Tony Costello, the keyboard player who has since been reduced to servicing a condom machine route in Spain. But, he is not `the star'. All of the characters are totally believable as members of the defunct group, but the memorable performance is given by Bill Nighy as Ray Simms, the lead singer, whose former good looks had compensated for his limited ability. He and his Swedish trophy wife, Astrid Simms (Helena Bergstrom) live in a mansion that is mortgaged to the hilt, in dire need of repair, and up for sale. Each member of the group is stuck in a job that they dislike, so when the suggestion of a comeback arises, they each agree. The problem of ego is still there, but the drinking, drugs and sex have been reduced to almost non-existent.
There is a lot of good adult humor, none of which is offensive. The jokes and sight gags are very real, as is the music.  You'll also remember `Brian's Theme' and `What Might Have Been'.
It is not a great movie, but it is enjoyable. Even if you're not an advocate of Rock music, you'll enjoy the story. I give it a solid B.
SEE YOU AT THE MOVIES!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Sales
Home
Sales
Enter Branch Info
Location
Minimum Customers Per Hour
Maximum Customers Per Hour
Average Purchased Per Customer


THE MIRROR HAS TWO FACES A film review by Michael John Legeros Copyright 1996 Michael John Legeros
(TriStar) Directed by Barbra Streisand Written by Richard LaGravenese Cast Barbra Streisand, Jeff Bridges, Lauren Bacall, Pierce Brosnan, Mimi Rogers, George Segal, Brenda Vaccaro MPAA Rating "PG-13" Running Time 125 minutes Reviewed at Mission Valley Cinemas, Raleigh, NC (09NOV96)
==
THE MIRROR HAS TWO FACES is a mess. Babs' new movie is a tedious exploration of a woman's appearance and her self-opinion therein, disguised as an old-fashioned romantic comedy about two college professors (Babs and Jeff Bridges) who enter into a chaste marriage because "sex ruins everything," set in an indulgent fantasy world populated by beautiful people like Elle Macpherson (as Bridges' ex- girlfriend!) and Pierce Brosnan (as Babs' old beau!), and shot through an endless series of hazy filters, or, perhaps, a year's worth of old pantyhose. The laughs are there, sometimes intended and sometimes not. I howled as an over-pronounced saxophone (on the soundtrack) circled the two during an intimate moment. And how about that busy Marvin Hamlisch score, that you half-expect Babs to break into song with?
Mr. Bridges is great fun to watch as the button-downed, bow-tied intellectual whose idea of a good time is bringing a spectral analyzer to a Christmas concert. (How much are those, anyway?) His character is perfectly serious (and perfectly believable) when he says "I'm sure if sex is something that interests you, I would provide that on occasion." Also very funny are Lauren Bacall and Mimi Rogers, as Barbra's mother and sister, respectively. (George Segal and Brenda Vaccaro, in supporting roles, are largely wasted.) As for Babs herself, well, it's quite a stretch to believe her as an ugly duckling spinster. Especially given the care that she's taken to look good in every. single. frame.
Grade: C+
--
Mike Legeros - Raleigh, NC, USA, Earth<EMAIL_ADDRESS>(h) -<EMAIL_ADDRESS>(w) I'm also on the Web! http://www.pagesz.net/~legeros/
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Hello Guys, My name is a right royal bhai or bholu singh. I'm living in Bharatpur.
Welcome to my website PalindromeChecker.
It is a website for those person that want to check a number or a string is a palindrome or not.
If you do not know what is a palindrome number then click , and to get a brief introduction about palindrome number.


{% extends 'base.html' %} {% load static %} {% block content %} {% if user.is_authenticated %} {% with user.appointment_set.upcoming as upcoming %} {% if upcoming %} You have the following appointments scheduled: {% for appt in upcoming %} {{ appt.get_type_display }}: {{ appt.dt|date:"SHORT_DATE_FORMAT" }} for {{ appt.duration }} {% endfor %} {% endif %} {% endwith %} {% endif %} Call or text us to schedule an appointment at<PHONE_NUMBER>. All times are in the central time zone. Online Sessions are held via Zoom. You can also check the Facebook page. Sunday By appointment only Monday 5:00 AM to 8:00 PM 8:15 AM to 9:00 AM: Morning Cute Questions Tuesday 5:00 AM to 8:00 PM 8:15 AM to 9:00 AM: Morning Cute Questions Wednesday 5:00 AM to 8:00 PM 8:15 AM to 9:00 AM: Morning Cute Questions Thursday 5:00 AM to 8:00 PM 8:15 AM to 9:00 AM: Morning Cute Questions Friday 5:00 AM to 4:00 PM 8:15 AM to 9:00 AM: Morning Cute Questions Saturday Closed {% endblock content %}
Online Sessions are held via Zoom. You can also check the Facebook page.


Lab3
How to write HTML and CSS
Web system design is a lot more fun than you think
I enjoy HTML and CSS. and I am also interested in JavaScript


Grad your booms and sweep some mines! Sweep them all safely under the carpet where they're out of sight to win!
Our unicorns are looking pretty depressed. Give them a hand inflating their balloons!
These moles are trying to get us involed in their pyramid scheme. Get rid of as many as you can!
Our clown is looking pretty poor (not financially, just a pathetic looking clown). Dress him up so he can do clown things!


[gecode-users] Gecode/J: Setting boolean var
Malcolm Ryan
malcolmr at cse.unsw.edu.au
Tue Nov 13 06:46:14 CET 2007
Is there a simple standard way to constraint the value of a BoolVar
to a constant?
bool_eq() does not have a constant argument version, and eq() doesn't
seem to
work.
Malcolm
--
"If there is one thing worse than the modern weakening of major morals
it is the modern strengthening of minor morals.
Thus it is considered more withering to accuse a man
of bad taste than of bad ethics." -- G.K.Chesterton, On Lying
in Bed
More information about the gecode-users
mailing list


Our Support Philosophy
By: Alex Marcy on February 05, 2015
Tagged: Educate General
Long term support can be a hot-button issue. We don't think it ever needs to get to that point.
You should never regret your decision to work with a supplier
Our philosophy when it comes to relationships with our customers is simple. You should never feel obligated or forced to call us to fix something.  We stand behind our work and will always be happy to fix any issues you find and will pick up the phone and give you any support you may need. Obviously there are some limitations around warranties so we may need to send you an invoice once all is said and done, still we don't want you to feel like your only option is to call us because you have no other choice.
Too many times we have worked with customers who called us in out of sheet desperation. They had it up to "here" with their current supplier, they got too busy to provide support or simply had disappeared off the face of the earth. The worst cases are usually 10 years later when some proprietary component has gone bad and the integrator is telling them it is either a full rip and replace with a new proprietary system or nothing.
We do not believe in this form of lock-in.
You should call us because you enjoy working with us, not because we are your only option.
If for whatever reason you think we failed to hold up our end of the bargain please let us know as soon as possible to give us a chance to rectify it. If we can't make it better we will at least make it as pain free as possible for you moving forward. We'll hold on to your code in case you need a backup. We'll spend a reasonable amount of effort answering questions on any of our custom software, and we go to great effort to write easy-to-follow code in the first place. If you need help finding someone else we will give you some recommendations.
You paid for your system, you worked along side us putting in the same blood, sweat, and tears we did. The last thing you should ever think is that you wasted your time and resources.
We work hard to make it easier for you to do your job. We are only successful when you are and we don't celebrate until we are cracking open some beers with you after a project is over. All of our lines of work can be hard enough when everyone gets along, we think it is easy to bond over the trials and tribulations and look to form long-lasting friendships with the people with whom we share the long hours.
When the time is right we like to play as hard as we work. We want you to come have fun with us. We can only do that if we can both pick up the phone and be excited to talk to each other.
Recent Posts:
MES Essentials Webinar Wrap-Up
07/17/15
MES Essentials Webinar
07/10/15
Tweets by @CorsoSystems


A cross site request forgery (or CSRF/XSRF) is an exploit that enables an
unauthorized third party to take actions on a web site as you. In Jenkins,
this could allow someone to delete jobs, builds or change Jenkins'
configuration.
When this option is enabled, Jenkins will check for a generated nonce value,
or "crumb", on any request that may cause a change on the Jenkins server.
This includes any form submission and calls to the remote API.
Enabling this option can result in some problems, like the following:
-
Some Jenkins features (like the remote API) are more difficult to use when
this option is enabled.
-
Some features, especially in plugins not tested with this option enabled,
may not work at all.
-
If you are accessing Jenkins through a reverse proxy, it may strip the
CSRF HTTP header, resulting in some protected actions failing.
More information about CSRF exploits can be found
here
.


This project helps you choose the equipment needed for Choose what you find most convenient and do not forget anything


Bill Smith's Atlantic Beach Pie
A sweet-salty twist on a classic North Carolina lemon pie that's as lazy and beachy as summer should be.
ingredients
For the crust:
- 1 1/2 sleeves of saltine crackers (about 6 ounces or 60 crackers)
- 1/2 cup softened unsalted butter
- 3 tablespoons sugar
For the filling:
- One 14-ounce can sweetened condensed milk
- 4 egg yolks
- 1/2 cup lemon or lime juice or a mix of the two
- Fresh whipped cream, for garnish
- Coarse sea salt, for garnish
preparation
- Preheat oven to 350° F.
- Crush the crackers finely, but not to dust. You can use a food processor or your hands. Add the sugar, then knead in the butter until the crumbs hold together like dough. Press into an 8-inch pie pan. Chill for 15 minutes, then bake for 18 minutes or until the crust is golden brown.
- While the crust is cooling (it doesn't need to be cold), beat the egg yolks into the milk, then beat in the citrus juice. It is important to completely combine these ingredients. Pour into the shell and bake for 16 minutes until the filling has set.
- The pie needs to be completely cold to be sliced. Serve with fresh whipped cream and a sprinkling of sea salt.
Makes 1 pie
As heard of on NPR!


Formats a string to the given format, you can wrap lines at a certain
length and indent them
* wrap : maximum line length * wrap_char : the character(s) to use to break the line * wrap_cut : if true, the words that are longer than $wrap are cut instead of overflowing * indent : amount of $indent_char to insert before every line * indent_char : character(s) to insert before every line * indent_first : amount of additional $indent_char to insert before the first line of each paragraphs * style : some predefined formatting styles that set up every required variables, can be "email" or "html" * assign : if set, the formatted text is assigned to that variable instead of being outputThis software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Located in /plugins/builtin/blocks/textformat.php (line 27)
Dwoo_Plugin | --Dwoo_Block_Plugin | --Dwoo_Plugin_textformat
Inherited from Dwoo_Block_Plugin
Dwoo_Block_Plugin::$buffer
Inherited from Dwoo_Plugin
Dwoo_Plugin::$dwoo
Inherited From Dwoo_Block_Plugin
Dwoo_Block_Plugin::buffer()
Dwoo_Block_Plugin::end()
Dwoo_Block_Plugin::postProcessing()
Dwoo_Block_Plugin::preProcessing()
Dwoo_Block_Plugin::process()
Inherited From Dwoo_Plugin
Dwoo_Plugin::__construct()
Dwoo_Plugin::paramsToAttributes()
Documentation generated on Sun, 07 Feb 2010 17:53:59 +0000 by phpDocumentor 1.4.0