$ uname -r
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
Note: this is a work-in-progress and will be updated with more information over the next few days.
This guide will walk you through deploying your own instance of the open-source Parse Server. This would be a good starting point for testing your existing application to see if the functionality provided by the server is enough for your application, and to potentially plan your migration off the Parse Platform.
This guide will walk you through using Elastic Beanstalk (EB), which is an AWS service similar to Heroku. Why use EB rather than Heroku? Elastic Beanstalk does not lock you into Heroku-specific ways of doing things, is likely cheaper to run your backend on than Heroku, and it integrates with other services that AWS offer (and they offer almost everything one needs to run an application these days).
#!/bin/bash | |
# This one-liner script plays a video in an infinite loop on a raspberry pi | |
# for a video-art exhibition. | |
# It was written for a video in portrait orientation so the video is rotated 270 | |
# to use up the whole screen (which was also rotated). | |
# Charles Martin, July 2016 | |
omxplayer -o local --loop /home/pi/video.mp4 --orientation 270 |
# How to install Check MK Agent on ubuntu 16.04 | |
# Install check_mk_agent: | |
# - sudo apt-get install check-mk-agent (will install older version) | |
# - On your Check_MK dashboard, go to "Monitoring Agents", click the link for "Check_MK Agent for Linux", save the raw text | |
# on your server: | |
sudo vi /usr/bin/check_mk_agent | |
# paste Check_MK dashboard > Monitoring Agents > Check_MK Agent for Linux |
// reference: https://stackoverflow.com/a/43637969/1477298
While originally I was using Objective-C, I since switched so Swift and the original accepted answer did not suffice.
I ended up creating a UICollectionViewLayout subclass which provides the best (imo) experience as opposed to the other functions which alter content offset or something similar when the user has stopped scrolling.
class SnappingCollectionViewLayout: UICollectionViewFlowLayout {
override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
1. Open Terminal | |
2. cd to your Xcode project | |
3. Execute the following when inside your target project: | |
find . -name "*.swift" -print0 | xargs -0 wc -l |
####################################################################### | |
# Setup: | |
# $ python3 -m venv venv | |
# $ source venv/bin/activate | |
# $ pip install requests | |
# Usage: | |
# $ python pgatour.py | |
####################################################################### | |
import os |
import os | |
import lxml.html as LH | |
import shutil | |
import requests | |
temp_dir = "/tmp/avatar_tmp" | |
if not os.path.isdir("html/avatars"): | |
os.mkdir("html/avatars") | |
if os.path.isdir(temp_dir): |