recentpopularlog in

kme : reference   1879

« earlier  
16 iOS Keyboard Shortcuts for iPhone » WebNots
5. Typing Single Numbers and Symbols Quickly

To enter a single number, you can tap the number icon on the keyboard to switch to the numeric keyboard with punctuation symbols. However, if you’re in a hurry, you can save some time by pressing and holding the 123 key and swiping to the number you wish to type. After the number is inserted the keyboard will then automatically switch back to the alphabet keyboard saving your time. The same trick works for typing capital letters using shift (up arrow) key and typing symbols using #+= key.
til  ios  iphone  ipad  keyboard  shortcuts  tipsandtricks  reference 
10 days ago by kme
Refine web searches - Google Search Help
'site:' is about the only useful one; I thought there would be a 'lang:' but nope.
google  keywords  search  searchengine  reference 
22 days ago by kme
charles leifer | Compiling SQLite for use with Python Applications
<code class="language-python">>>> import sqlite3
>>> sqlite3.sqlite_version
'3.25.0'</code>
python  sqlite  fromsource  reference 
26 days ago by kme
Spotlight Metadata Attributes
You can use these with 'mdfind', e.g., 'kMDItemKind == "Application"'.
mdfind  metadata  spotlight  macos  osx  devel  reference 
5 weeks ago by kme
The Complete Guide to Creating Symbolic Links (aka Symlinks) on Windows
<code class="lang-batch">
:: Use /D when you want to create a soft link pointing
:: to a directory. like so:
mklink /D Link Target
</code>
symlink  junctionpoints  directoryjunction  hardlink  windows  sysadmin  cli  commandline  mklink  reference  solution  dammitbrain 
6 weeks ago by kme
10 of the Best Defaults Write Commands to Improve Mac OS X
Not sure if this works in Mojave (10.14):
<code class="language-bash">defaults write com.apple.dock expose-animation-duration -float 0.12 && killall Dock</code>
mac  osx  macos  defaults  settings  desktoptweaks  reference 
7 weeks ago by kme
DBD::mysql - MySQL driver for the Perl5 Database Interface (DBI) - metacpan.org
Additionally, turning on this flag tells MySQL that incoming data should be treated as UTF-8. This will only take effect if used as part of the call to connect(). If you turn the flag on after connecting, you will need to issue the command SET NAMES utf8 to get the same effect.


This did *not* work as advertised, and I ended up setting it *after* the connect, along with 'SET NAMES', which actually *did* seem to fix the error messages I was getting about "COLLATION 'utf8_bin' is not valid for CHARACTER SET 'latin1'":

<code class="language-perl"># source https://www.gyford.com/phil/writing/2008/04/25/utf8-mysql-perl/
# see also: https://stackoverflow.com/a/6423280/785213
$dbh->{mysql_enable_utf8} = 1;
# $dbh->do('SET NAMES utf8');</code>
perl  dbi  dbd  mysql  dba  devel  reference  errormessage  workaround  solution 
9 weeks ago by kme
SSH tunnelling for fun and profit: Autossh
<code class="language-bash">autossh -M 0 -f -T -N cli-mysql-tunnel</code>

And make sure that you have set some value for 'ServerAliveInterval' and 'ServerAliveCountMax':
Unfortunately, this is not too handy, as it must be made sure both ports (the specified one and the one directly above) a free (not used). So in order to overcome this problem, there is a better solution:

ServerAliveInterval and ServerAliveCountMax – they cause the SSH client to send traffic through the encrypted link to the server. This will keep the connection alive when there is no other activity and also when it does not receive any alive data, it will tell AutoSSH that the connection is broken and AutoSSH will then restart the connection.


For example:

<code class="language-bash">autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3"</code>
automation  ssh  sshtunnelling  vpn  remoteaccess  reference  solution 
9 weeks ago by kme
compgen: An Awesome Command To List All Linux Commands - nixCraft
<code class="language-bash">########################################
# Task: show all the bash built-ins
########################################
compgen -b
########################################
# Task: show all the bash keywords
########################################
compgen -k
########################################
# Task: show all the bash functions
########################################
compgen -A function</code>
bash  programmablecompletion  completion  tabcompletion  compgen  reference  newbie 
9 weeks ago by kme
python - UnicodeEncodeError: 'ascii' codec can't encode character u'xa0' in position 20: ordinal not in range(128) - Stack Overflow | https://stackoverflow.com/
So, even if your format string is Unicode, you *still* need to encode it?

Weird.

<code class="language-python">
print(u"{}\u00a0{}\u00a0{}\u00a0".format('non', 'breaking', 'spaces').encode.('utf-8'))
</code>
This is a classic python unicode pain point! Consider the following:
<code>
a = u'bats\u00E0'
print a
=> batsà
</code>

All good so far, but if we call str(a), let's see what happens:
<code>
str(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 4: ordinal not in range(128)
</code>

Oh dip, that's not gonna do anyone any good! To fix the error, encode the bytes explicitly with .encode and tell python what codec to use:
<code>
a.encode('utf-8')
=> 'bats\xc3\xa0'
print a.encode('utf-8')
=> batsà
</code>
python  unicode  stringconcatenation  encoding  utf8  solution  reference 
july 2019 by kme
perlfaq6 - Regular Expressions - metacpan.org | https://metacpan.org/
In fact, the question that I had is sort-of-answered in perlfaq4, which refers you to Regexp::Common, which is, unfortunately, not part of the standard library.
This section is surprisingly small because the rest of the FAQ is littered with answers involving regular expressions. For example, decoding a URL and checking whether something is a number can be handled with regular expressions, but those answers are found elsewhere in this document (in perlfaq9: "How do I decode or create those %-encodings on the web" and perlfaq4: "How do I determine whether a scalar is a number/whole/integer/float", to be precise).
perl  regex  regexp  faq  newbie  reference 
july 2019 by kme
X resources - ArchWiki | https://wiki.archlinux.org/
Load a resource file (such as the conventional .Xresources), replacing any current settings:
<code class="language-bash">
$ xrdb ~/.Xresources
</code>

Load a resource file, and merge with the current settings:
<code class="language-bash">
$ xrdb -merge ~/.Xresources
</code>

Note:
Most Display managers load the ~/.Xresources file on login.
The older ~/.Xdefaults file is read when an X11 program starts, but only if xrdb has not been used in the current session. [1]
x11  configfuration  xdefaults  xresources  reference  xterm  urxvt  configfile  dotfile 
july 2019 by kme
tmux send-keys syntax - Stack Overflow
This didn't seem to work for sending Enter,Enter,~,. (to disconnect a non-responsive SSH session); but then again, maybe I never had an SSH session to begin with ('bsub -Is' not 'bsub -ISs').
tmux  automation  reference 
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
docker attach | Docker Documentation
To stop a container, use CTRL-c. This key sequence sends SIGKILL to the container. If --sig-proxy is true (the default), CTRL-c sends a SIGINT to the container. You can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.
docker  commandline  reference 
june 2019 by kme
RFC 1855 Netiquette Guidelines - October 1995
This bibliography was used to gather most of the information in the
sections above as well as for general reference. Items not
specifically found in these works were gathered from the IETF-RUN
Working Group's experience.

[1] Angell, D., and B. Heslop, "The Elements of E-mail Style",
New York: Addison-Wesley, 1994.

[2] "Answers to Frequently Asked Questions about Usenet"
Original author: jerry@eagle.UUCP (Jerry Schwarz)
Maintained by: netannounce@deshaw.com (Mark Moraes)
Archive-name: usenet-faq/part1

[3] Cerf, V., "Guidelines for Conduct on and Use of
Internet", at: <URL://http://www.isoc.org/proceedings/
conduct/cerf-Aug-draft.html>

[4] Dern, D., "The Internet Guide for New Users", New York:
McGraw-Hill, 1994.

[5] "Emily Postnews Answers Your Questions on Netiquette"
Original author: brad@looking.on.ca (Brad Templeton)
Maintained by: netannounce@deshaw.com (Mark Moraes)
Archive-name: emily-postnews/part1

[6] Gaffin, A., "Everybody's Guide to the Internet", Cambridge,
Mass., MIT Press, 1994.

[7] "Guidelines for Responsible Use of the Internet"
from the US house of Representatives gopher, at:
<URL:gopher://gopher.house.gov:70/OF-1%3a208%3aInternet
%20Etiquette>

[8] How to find the right place to post (FAQ)
by buglady@bronze.lcs.mit.edu (Aliza R. Panitz)
Archive-name: finding-groups/general

[9] Hambridge, S., and J. Sedayao, "Horses and Barn Doors:
Evolution of Corporate Guidelines for Internet Usage",
LISA VII, Usenix, November 1-5, 1993, pp. 9-16.
<URL: ftp://ftp.intel.com/pub/papers/horses.ps or
horses.ascii>

[10] Heslop, B., and D. Angell, "The Instant Internet guide :
Hands-on Global Networking", Reading, Mass., Addison-Wesley,
1994.

[11] Horwitz, S., "Internet Etiquette Tips",
<ftp://ftp.temple.edu/pub/info/help-net/netiquette.infohn>

[12] Internet Activities Board, "Ethics and the Internet", RFC 1087,
IAB, January 1989. <URL: ftp://ds.internic.net/rfc/rfc1087.txt>

[13] Kehoe, B., "Zen and the Art of the Internet: A Beginner's
Guide", Netiquette information is spread through the chapters
of this work. 3rd ed. Englewood Cliffs, NJ., Prentice-Hall,
1994.

[14] Kochmer, J., "Internet Passport: NorthWestNet's Guide
to our World Online", 4th ed. Bellevue, Wash.,
NorthWestNet, Northwest Academic Computing Consortium, 1993.

[15] Krol, Ed, "The Whole Internet: User's Guide and
Catalog", Sebastopol, CA, O'Reilly & Associates,
1992.

[16] Lane, E. and C. Summerhill, "Internet Primer for
Information Professionals: a basic guide to Internet networking
technology", Westport, CT, Meckler, 1993.

[17] LaQuey, T., and J. Ryer, "The Internet Companion",
Chapter 3 "Communicating with People", pp 41-74. Reading,
MA, Addison-Wesley, 1993.

[18] Mandel, T., "Surfing the Wild Internet", SRI International
Business Intelligence Program, Scan No. 2109. March, 1993.
<URL: gopher://gopher.well.sf.ca.us:70/00/Communications/
surf-wild>

[19] Martin, J., "There's Gold in them thar Networks! or Searching for
Treasure in all the Wrong Places", FYI 10, RFC 1402,
January 1993. <URL: ftp://ds.internic.net/rfc/rfc1402.txt>

[20] Pioch, N., "A Short IRC Primer", Text conversion
by Owe Rasmussen. Edition 1.1b, February 28, 1993.
<URL: http://www.kei.com/irc/IRCprimer1.1.txt>

[21] Polly, J., "Surfing the Internet: an Introduction",
Version 2.0.3. Revised May 15, 1993.
<URL: gopher://nysernet.org:70/00/ftp%20archives/
pub/resources/guides/surfing.2.0.3.txt>
<URL: ftp://ftp.nysernet.org/pub/resources/guides/
surfing.2.0.3.txt>

[22] "A Primer on How to Work With the Usenet Community"
Original author: chuq@apple.com (Chuq Von Rospach)
Maintained by: netannounce@deshaw.com (Mark Moraes)
Archive-name: usenet-primer/part1

[23] Rinaldi, A., "The Net: User Guidelines and Netiquette",
September 3, 1992.
<URL: http://www.fau.edu/rinaldi/net/index.htm>

[24] "Rules for posting to Usenet"
Original author: spaf@cs.purdue.edu (Gene Spafford)
Maintained by: netannounce@deshaw.com (Mark Moraes)
Archive-name: posting-rules/part1

[25] Shea, V., "Netiquette", San Francisco: Albion Books,
1994?.

[26] Strangelove, M., with A. Bosley, "How to Advertise
on the Internet", ISSN 1201-0758.

[27] Tenant, R., "Internet Basics", ERIC Clearinghouse of Information
Resources, EDO-IR-92-7. September, 1992.
<URL: gopher://nic.merit.edu:7043/00/introducing.
the.internet/internet.basics.eric-digest>
<URL: gopher://vega.lib.ncsu.edu:70/00/library/
reference/guides/tennet>

[28] Wiggins, R., "The Internet for everyone: a guide for
users and providers", New York, McGraw-Hill, 1995.
rfc  etiquette  netiquette  howto  reference 
june 2019 by kme
BubbleSort Zines
Zines about computer science! Each zine focuses on one concept & is filled with comics, diagrams, stories, examples, and exercises.
cs  code  art  devel  programming  reference  newbie  zine 
june 2019 by kme
« earlier      
per page:    204080120160

Copy this bookmark:





to read