recentpopularlog in

kme : history   294

« earlier  
Bashhub · Every command. | https://bashhub.com/
Hope there are no passwords or API keys in your history.
sysadmin  linux  unix  bash  history  cloud  cloudstorage  searchengine 
6 weeks ago by kme
Better Bash history | Arabesque | https://sanctum.geek.nz/
Nice, concise explanation of how to get sane Bash history settings.
linux  unix  bash  bashhistory  history  dotfiles  newbie  howto  reference 
11 weeks ago by kme
Parcellite indicator in Ubuntu 13.10 - Ask Ubuntu | https://askubuntu.com/
It seems that a fork of Parcellite is available and this fork supports does provide an indicator for Unity:

Parcellite with Ubuntu AppIndicator? ClipIt!


Links to: http://www.webupd8.org/2011/01/parcellite-has-new-developer-and-new.html
linux  clipboardmanager  clipboard  history  utility  essential  alternativeto  diodon  movein 
november 2019 by kme
perldebug - perldoc.perl.org
Put this in ~/.perldb to get a persistent history between sessions:
<code class="language-perl">parse_options("HistFile=$ENV{HOME}/.perldb_history HistSize=1000");</code>
perldb  debugger  configfile  history  essential  movein  solution 
november 2019 by kme
Use Vim Inside a Unix Pipe Like Sed or AWK | Hacker News
http://blog.robertelder.org/use-vim-inside-a-unix-pipe-like-sed-or-awk/
Good point.This argument that domestication lowers intelligence (among other powerful abilities) and that we are unquestionably domesticating ourselves is pretty damn solid. The only argument against it seems to be "... but my ego!".

Obviously there is some interplay with the fact that we develop new mental models and thinking tools to augment intelligence.

Also immersion as children in highly abstract ways of thinking further augments/multiplies raw intelligence (most convincing explanation to the Flynn effect imo).

I've lost the link, but there was an excellent article I read related to the amazing Otzi discovery (https://en.wikipedia.org/wiki/%C3%96tzi) describing how adults of that era (modern humans, primitive societies) would likely have been terrifying to us now in just how much they outclassed us in raw strength, intelligence and stamina. We would be relying a lot on the benefits of childhood nutrition and education to feel superior. This isn't completely convincing, there are a lot of factors in play, but those levels of brutal competition and danger would have a profound effect, especially epigenetically.
vim  texteditors  anthropology  history  forthecomments 
october 2019 by kme
List commits between 2 commit hashes in git - Stack Overflow
I ended up using
<code class="language-bash">git log -L 150,180:builtins/shopt.def bash-4.1.11..bash-4.3</code>
to solve the problem I was having (which version of Bash introduced the 'direxpand' option to 'shopt'; hint: 4.2.29)

See also: https://unix.stackexchange.com/q/498857/278323
devel  git  commit  history  automation  forensics  sortof  solution 
august 2019 by kme
We’re Re-animating Beer from Century-Old Yeast | Urban Artifact
Full video: https://www.youtube.com/watch?v=A7QmGyWzr5E
Kollman Baker got wind of the rumored fermenting tank from our friend Michael Morgan, an author and entrepreneur who helped blaze Cincinnati’s Brewing Heritage Trail. “They found cellars on Race Street and apparently there’s this big wooden vat,” Kollmann Baker recalls Morgan telling him. Kollman Baker was skeptical. But Morgan, Cincinnati’s pre-eminent beer historian, had ascertained that a tenement building in the Over-the-Rhine neighborhood of Cincinnati—an epicenter of 19thcentury beer-making, just north of downtown—stood atop stone-vaulted lagering cellars used by some of the city’s most prominent beer barons.

Approximately 60 yeast scrapings were gathered from inside and outside the vat, its spigot, and even the cellar’s walls, and captured in jars of wort (a malt infusion; a sort of pre-beer beer). We fermented them for six months and then cracked them open. Well, most of them. Some appeared too scary to unleash. “A few of them had turned black,” recalls Morgan, who cautiously sampled drops with the Urban Artifact brewers. “There was a mild freakout from one of the testers who jumped up to wash his hands.”
beer  wildcaught  yeast  fermentation  history  cincinnati  brewing 
august 2019 by kme
How (and Why) to Log Your Entire Bash History
Interesting technique, but as mentioned in the comments, you can use Bash's built-in features to do basically the same thing.

Curiously, this was the same basic approach as in the "eternal history" article at https://debian-administration.org/article/543/Bash_eternal_history.
interesting  bash  history  histfile  promptcommand  dotfile 
july 2019 by kme
Preserve bash history in multiple terminal windows - Unix & Linux Stack Exchange
True dat:
@Oli wrote, "I can't think of an intelligent way to do it where existing terminals only see their own history but new ones see a chronologically accurate list of commands." How about (untried): export PROMPT_COMMAND="history -a; $PROMPT_COMMAND". Existing shells will add each command to the history file for new shells to see, but only show their own histories.


Many solutions proposed, all with caveats, but this is what I decided on:

<code class="language-bash">
HISTCONTROL=ignoredups:erasedups # no duplicate entries
HISTSIZE=100000 # big big history
HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite

# append current history list to the history file after each command finishes
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }history -a"</code>

This appends lines to the history file after each command, which makes them available in other sessions, but up arrow will still reverse through the history only for the current session, which is probably less confusing.

You can bring in commands from other sessions (which have been written to the history file) with 'history -n'. Depending on the setting of 'HISTCONTROL', these might end up getting written out to the history file again, though. ¯\_(ツ)_/¯
bash  history  histfile  historyexpansion  frustration  configfile  forthecomments  solution 
july 2019 by kme
Bash eternal history
Many times I've found myself using Ctrl-R in Bash to get a old command four times the terminal width, just to find out that too many days have passed and it's no longer in the .bash_history file. Here are two lines that will keep track of every command line you type at the bash prompt and use no external processes at all, just plain bash.

My first approach to this problem was increasing the maximum number of lines in the history to a very large quantity. But no matter how large it was, there was always a moment when I needed a long command I typed many months ago and it had already left the history. The current solution came to my mind when I learned about the PROMPT_COMMAND variable, a command that bash executes before showing each prompt. Here are the two lines:
<code class="language-bash">export HISTTIMEFORMAT="%s "
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER \
"$(history 1)" >> ~/.bash_eternal_history'</code>
bash  history  histfile  configfile  maybesolution 
july 2019 by kme
7 Tips - Tuning Command Line History in Bash - ShellHacks
There's nothing here that isn't in the manual, but it's a concise reference that's all in one place. Every 'shopt' and 'HISTCONTROL' option listed here seems to be supported in Bash 4.1 and above (this means CentOS 6).

The 'PROMPT_COMMAND' example, though, would clobber an existing PROMPT_COMMAND, so do it like this instead:
<code class="language-bash">PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }history -a"</code>
bash  history  histfile  configfile  dotfile  essential  movein  reference 
july 2019 by kme
savehistory function | R Documentation
The "Example" section is jacked up, and I can't tell what that's supposed to look like; try https://stackoverflow.com/a/16738440 (answer from Hadley Wickham) instead.

Maybe the version of R that we have on the cluster didn't build against the readline library or something, and *that's* why up/down arrows don't recall the history.
r  history  repl  annoyance  maybesolution 
june 2019 by kme
r - Saving and loading history automatically - Stack Overflow
In my ~/.profile I have:
<code class="language-bash">export R_HISTFILE=~/.Rhistory</code>

In my ~/.Rprofile I have:
<code class="language-R">if (interactive()) {
.Last <- function() try(savehistory("~/.Rhistory"))
}</code>

and that works for me (although it doesn't work very well if you have multiple R sessions open). I also have
<code class="language-bash">alias R='R --no-save --no-restore-data --quiet'</code>

in my profile which eliminates the questions on close.
r  repl  history  configfile  annoyance  solution  fuckina 
june 2019 by kme
At the mercy of suppliers.
We couldn't even figure out if it was a hardware problem or a software problem - Solaris had to be updated for the new machine, so it could have been a kernel problem. But nothing was reproducible. We'd get core dumps and spend hours pouring over them. Some were just crazy, showing values in registers that were simply impossible given the preceeding instructions. We tried everything. Replacing processor boards. Replacing backplanes. It was deeply random. It's very randomness suggested that maybe it was a physics problem: maybe it was alpha particles or cosmic rays. Maybe it was machines close to nuclear power plants. One site experiencing problems was near Fermilab. We actually mapped out failures geographically to see if they correlated to such particle sources. Nope. In desperation, a bright hardware engineer decided to measure the radioactivity of the systems themselves. Bingo! Particles! But from where? Much detailed scanning and it turned out that the packaging of the cache ram chips we were using was noticeably radioactive. We switched suppliers and the problem totally went away . After two years of tearing out hair out, we had a solution.
sun  history  computing  intermittentfailures  debugging  radioactivity 
june 2019 by kme
'Breakfast Food' Is a Lie - The Atlantic
In at least one sense, a college student waking after a night out and scarfing down two slices of unrefrigerated pizza rapidly aging in their delivery box is actually just participating in what breakfast has historically meant to billions of people.
breakfast  food  culture  america  history 
june 2019 by kme
The Computer Chronicles - UNIX (1985) - YouTube | https://www.youtube.com/

Stewart Cheifet: ... Why is there sudden excitement about UNIX?

Gary Kildall: Well it shouldn't be a sudden excitement--UNIX itself has been around since the late 60s. The problem is that micros haven't had the power to support... they haven't had the large amount of main memory, the hard disk, the fast processor, and so forth, but nowadays micros do have that power, and so UNIX becomes a serious contender for an operating system standard.

OK, in fact many people are saying UNIX become *the* standard operating system of the future, but there are *many* uses of UNIX going on right now. We have a report....
unix  history  computing  video 
may 2019 by kme
Monopoly’s Inventor: The Progressive Who Didn’t Pass ‘Go’ - The New York Times
Who should get credit for an invention and how? The Monopoly game raises that question in a particularly compelling way. “Success has many fathers,” goes the adage — to say nothing of the mothers.
gaming  history  settingtherecordstraight 
march 2019 by kme
linux - Remove a certain line from Bash history file - Super User | https://superuser.com/
You can achieve removal from the history file using the commandline in two steps:

Typing history -d <line_number> deletes a specified line from the history in memory.
Typing history -w writes the current in-memory history to the ~/.bash_history file.

The two steps together remove the line permanently from the in-memory history and from the .bash_history file as well.
bash  history  security  cya  oops  solution  fuckina 
march 2019 by kme
The #! magic, details about the shebang/hash-bang mechanism | https://www.in-ulm.de/
what's special about #!

#! was a great hack to make scripts look and feel like real executable binaries.

But, as a little summary, what's special about #!? (list mostly courtesy of David Korn)

- the interpretername must not contain blanks
- the length of the #! is much smaller than the maximum path length
- $PATH is not searched for the interpreter
- (apart from an absolute path, the #! line also accepts a relative path,
- and #!interpreter is equivalent to #!./interpreter,
- however, it's not of any practical use)
- the interpreter usually must no be a #! script again
- the handling of arguments in the #! line itself is varying
- the setuid mechanism may or may not be available for the script
- there's no way to express #!$SHELL

And why shebang? In music, '#' means sharp. So just shorten #! to sharp-bang. Or it might be derived from "shell bang". All this probably under the influence of the american slang idiom "the whole shebang" (everything, the works, everything involved in what is under consideration). See also the wiktionary, jargon dictionary or Merriam-Websters. Sometimes it's also called hash-bang, pound-bang, sha-bang/shabang, hash-exclam, or hash-pling (british, isn't it?).

According to Dennis M. Ritchie (email answer to Alex North-Keys) it seems it had no name originally.
And Doug McIllroy mentioned (TUHS mailing list), that the slang for # at Bell Labs most probably was "sharp" at the time.
bourne  bash  posix  shell  shebang  unix  linux  shellscripting  history  butwhy  explained 
february 2019 by kme
Rhiannon Giddens Forms 'Our Native Daughters' to Reclaim the Soul of Country Music
The gaze of the camera, however, does not rest on her, the victim’s face. It rests on her husband, the man who was “wronged” as an impetus for him to rebel against his white oppressors—and as I sat in the little theater in New York City, I found myself furious. Furious at the moment in a long history of moments of the pain and suffering of black women being used to justify a man’s actions; at her own emotion and reaction being literally written out of the frame. The idea of taking historical words and notions and observations about slavery and making art with them then came to me.

There is surely racism in this country—it’s baked into our oldest institutions—just as there is sexism, millennia old. At the intersection of the two stands the African-American woman. Used, abused, ignored, and scorned, she has in the face of these things been unbelievably brave, groundbreaking, and insistent. Black women have historically had the most to lose, and have therefore been the fiercest fighters for justice—in large, public ways that are only beginning to be highlighted, and in countless domestic ways that will most likely never be acknowledged.
music  folkmusic  blackamerica  history  album 
february 2019 by kme
bash - Set and Shopt - Why Two? - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
The difference is in the changed environment variable used by bash. Setting with the set command results in $SHELLOPTS. Setting with the shopt command results in $BASHOPTS.
bourne  bash  shell  configfile  configuration  history  butwhy  explained 
february 2019 by kme
Enhanced Tk Console: tkcon | http://tkcon.sourceforge.net/
Minimal ~/.tkconrc for a decent font and window size:

<code class="language-tcl">
tkcon font mononoki 14
set ::tkcon::OPT(cols) 100
set ::tkcon::OPT(rows) 25
</code>
tcl  tk  console  cli  repl  history  readline 
january 2019 by kme
scripting - How to get Command history by cursor key in Linux tclsh - Stack Overflow | https://stackoverflow.com/
Also, install the 'tkcon' package, from ActiveState.
You want access to the readline library, you can do that with rlwrap:
<code class="language-bash">
rlwrap tclsh
</code>

Useful options are -c for file name completion, and -f to add words from a file to the completion list:
<code class="language-bash">
rlwrap -cf my_complete_file tclsh
</code>

Since you almost always want to use rlwrap, adding a shell alias is useful:
<code class="language-bash">
alias tclsh='rlwrap tclsh'
</code>
tcl  tclsh  commandline  history  readline  solution 
january 2019 by kme
Ask HN: Were we more productive 10, 15, or 20 years ago? | Hacker News | https://news.ycombinator.com/
I am super-uber productive. I am lead developer of 3 libraries, and 2 of the 3 flagship products of the facial recognition company I work. My background includes VFX production as a developer and digital artist for 9 major release feature films, lead 3D game console developer for 15 years, and OS developer of the original PlayStation. Through ALL that, I still use the same "make" I used back in the 80's, I hand write my make files, just give me a text editor and a compiler. That is ALL I need, that and to be left alone.

No slack/chat app bullshit, no trying out of tools, just doing the job with the tools I know very well. Delivering early, or over delivering on time, with 100% certainty of what I'm delivering because I know the libs and tool chain from years of experience with them.
productivity  webdevel  frameworks  history  tooling  thewaythingswere 
december 2018 by kme
Remember all your bash history forever | http://jesrui.sdf-eu.org/
WATCH OUT! Old-ass versions of Bash (4.1.x on CentOS 6, for example) will truncate your damn history file if you use HISTFILESIZE=-1 or HISTSIZE=-1.
Append the following lines to /etc/bash.bashrc:
<code class="language-bash">HISTTIMEFORMAT='%F %T '
HISTFILESIZE=-1
HISTSIZE=-1
HISTCONTROL=ignoredups
HISTIGNORE=?:??
shopt -s histappend # append to history, don't overwrite it
# attempt to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# save multi-line commands to the history with embedded newlines
shopt -s lithist</code>

This configures bash to save every command line typed at the interactive shell prompt (HISTFILESIZE) to ~/.bash_history (default), including a timestamp (HISTTIMEFORMAT) and ignoring consecutive duplicate entries (HISTCONTROL). By setting HISTSIZE to the same value as HISTFILESIZE, all saved commands are read back to memory when a new interactive shell starts. The default value for HISTSIZE (500) would load only a fraction of the saved history.

When saving the history at shell exit, history lines are appended to existing ones, instead of replacing them (shopt -s histappend).

By setting HISTIGNORE=?:??, lines consisting of just one or two characters are discarded from the history (e.g. ls commands).
bash  history  tipsandtricks  configsettings  essential  movein  bashrc 
october 2018 by kme
Bash Reference Manual: Bash History Builtins | https://www.gnu.org/
A useful alias to use with the fc command is r='fc -s', so that typing ‘r cc’ runs the last command beginning with cc and typing ‘r’ re-executes the last command (see Aliases).
bash  history  tipsandtricks  bashrc  bash_aliases  movein  essential 
october 2018 by kme
replace - In Vim is there a way to delete without putting text in the register? - Stack Overflow | https://stackoverflow.com/
To delete something without saving it in a register, you can use the "black hole register":
<code class="language-vim">"_d</code>

Of course you could also use any of the other registers that don't hold anything you are interested in.
vim  security  history  solution  registers  copypaste  fuckina 
october 2018 by kme
c# - Converting the date within the places.sqlite file in Firefox to a DateTime - Stack Overflow

Unix timestamps are measured in seconds. These values are larger by a factor of one million, i.e., they are using microseconds:

<code>> select datetime(1373306583389000 / 1000000, 'unixepoch');
2013-07-08 18:03:03</code>
mozilla  filrefox  places.sqlite  history  solution 
may 2018 by kme
1848 Daguerreotypes Bring Middle America’s Past to Life | WIRED | https://www.wired.com/
Fontayne and Porter were definitely skilled, but no one knew just how amazing their images were until three years ago, when conservators at George Eastman House in Rochester, New York, began restoration work on the deteriorating plates. Magnifying glasses didn’t exhaust their detail; neither did an ultrasharp macro lens. Finally, the conservators deployed a stereo microscope. What they saw astonished them: The details — down to window curtains and wheel spokes — remained crisp even at 30X magnification. The panorama could be blown up to 170 by 20 feet without losing clarity; a digicam would have to record 140,000 megapixels per shot to match that. Under the microscope, the plates revealed a vanished world, the earliest known record of an urbanizing America.
photography  daguerreotype  cincinnati  history 
april 2018 by kme
bash - Temporarily suspend bash_history on a given shell? - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
Turn Off
<code class="language-bash">
set +o history
</code>

Turn on

<code class="language-bash">
set -o history
</code>
bash  history  dammitbrain  solution 
january 2018 by kme
« earlier      
per page:    204080120160

Copy this bookmark:





to read