Create a new Automater flow
Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.
# inlog gegevens zelf invullen: | |
user= | |
passwd= | |
# BACK UP | |
token=`curl -s --request POST "https://portal.icy.nl/login"; --data "username=$user&password=$passwd" | awk -F":" '{print $12}' | awk -F'"' '{print $2}'` | |
rm et.bup | |
echo -n `curl -s -H "Session-token:$token" --request GET "https://portal.icy.nl/data" ; | awk -F":" '{print $13}' | awk -F'"' '{print $1}' | sed s/"\["/"\,"/ | sed s/"],"// | sed s/\,/"\&week-clock[]="/g` >> et.bup | |
echo -n `curl -s -H "Session-token:$token" --request GET "https://portal.icy.nl/data" ; | awk -F":" '{print $14}' | awk -F'"' '{print $1}' | sed s/"\["/"\,"/ | sed s/"],"// | sed s/\,/"\&configuration[]="/g` >> et.bup |
#!/bin/sh | |
service rsyslog stop | |
sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf | |
service rsyslog start |
# http://localhost:8983 | |
# Information for any lucene index through https://wiki.apache.org/solr/LukeRequestHandler | |
/solr/admin/luke?numTerms=0 | |
# Wildcard query | |
/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on | |
# Query for text | |
/solr/select?omitHeader=false&fl=*&sort=position_category_+asc&start=0&q=THIS_IS_THE_SEARCH_TEXT&json.nl=flat&qt=magento_nl&wt=xml&rows=100 |
/** @var array $_productSkus */ | |
protected $_productSkus; | |
/** | |
* Return the sku for a given productId | |
* | |
* @param $productId | |
* @return bool | |
*/ | |
public function getProductSku($productId) |
http://stackoverflow.com/questions/12168452/long-lasting-fb-access-token-for-server-to-pull-fb-page-info/21927690#21927690 | |
Having found that it is possible to generate a Facebook Page Access Token that does not expire (with help from @Igy), here is a clear, step-by-step quide for all those looking to the same: | |
1. Make sure you are the admin of the FB page you wish to pull info from | |
2. Create a FB App (should be with the same user account that is the page admin) | |
3. Head over to the Facebook Graph API Explorer | |
4. On the top right, select the FB App you created from the "Application" drop down list | |
5. Click "Get Access Token" | |
6. Make sure you add the manage_pages permission |
- Open Automator and create a new Service | |
- Change "service receives selected:" [text] to [no input] | |
- Add the "run apple script" action to the main screen | |
- Enter and save the following three apple scripts | |
- Go to keyboard shortcuts preference pane and configure your shortcuts to the newly created services | |
Create a new Automater flow
Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.
It will pull the team icon from each slack account you're connected to that has finished loading. If you log into another slack account later on in your session, you can run the script again to fill in any missing team icons.
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
## | |
## https://docs.docker.com/install/linux/docker-ce/ubuntu | |
## | |
# Install packages to allow apt to use a repository over HTTPS: | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common |