Try Chardet(https://pypi.python.org/pypi/chardet)
(Need to change font)
chcp 65001
Want to get back?
| wait_single_host() { | |
| local host=$1 | |
| shift | |
| local port=$1 | |
| shift | |
| echo "==> Check host ${host}:${port}" | |
| while ! nc ${host} ${port} > /dev/null 2>&1 < /dev/null; do echo " --> Waiting for ${host}:${port}" && sleep 1; done; | |
| } |
| #!/usr/bin/ruby | |
| class IPGenerator | |
| public | |
| def initialize(session_count, session_length) | |
| @session_count = session_count | |
| @session_length = session_length | |
| @sessions = {} | |
| end |
| const shell = require('./modules/shell'); | |
| var shellRegex = new RegExp('^/shell(' + BOTNAME + ')?$', 'i'); | |
| bot.onText(shellRegex, (msg, match) => { | |
| var messageId = msg.message_id; | |
| var chatId = msg.chat.id; | |
| var fromId = msg.from.id; | |
| var opts = { | |
| reply_markup: JSON.stringify({force_reply: true, selective: true}), | |
| reply_to_message_id: messageId |
Try Chardet(https://pypi.python.org/pypi/chardet)
(Need to change font)
chcp 65001
Want to get back?
These are the Terminal commands I recently used (June 2016) to install Git 2.13.0 from source on RHEL 7.x. I ran this in a VirtualBox VM after a fresh install from the ISO.
You mileage will vary as the yum packages are updated over time. The yum install line below should include all the dependencies, at least it did for me. Depending upon how often you use yum update you may need to run yum --enablerepo=base clean metadata as su before you run the following commands.
cd ~/Downloads
su
yum install autoconf cpio curl-devel expat-devel gcc gettext-devel make openssl-devel perl-ExtUtils-MakeMaker zlib-devel
wget -O v2.13.0.tar.gz https://github.com/git/git/archive/v2.13.0.tar.gz| """Print SQLAlchemy queries (including bind params). | |
| See also: http://docs.sqlalchemy.org/en/latest/faq/sqlexpressions.html#faq-sql-expression-string | |
| """ | |
| def show_query(query): | |
| qc = query.statement.compile( | |
| dialect=query.session.bind.dialect, |
| import pip | |
| from subprocess import call | |
| for dist in pip.get_installed_distributions(): | |
| call("pip install --upgrade " + dist.project_name, shell=True) |
| -- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
| -- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
| if application "iTunes" is running then | |
| tell application "iTunes" | |
| if player state is playing then | |
| return (get artist of current track) & " - " & (get name of current track) | |
| else | |
| return "" | |
| end if |
| -- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
| -- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
| if application "Spotify" is running then | |
| tell application "Spotify" | |
| if player state is playing then | |
| return (get artist of current track) & " - " & (get name of current track) | |
| else | |
| return "" | |
| end if |
| def update_user_social_data(strategy, *args, **kwargs): | |
| """Set the name and avatar for a user only if is new. | |
| """ | |
| print 'update_user_social_data ::', strategy | |
| if not kwargs['is_new']: | |
| return | |
| full_name = '' | |
| backend = kwargs['backend'] |