type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| <?php | |
| //Add metabox with dynamically added key-value (with more values possible) custom fields | |
| //Based on http://wordpress.stackexchange.com/questions/19838/create-more-meta-boxes-as-needed/19852#19852 | |
| // Caution, there're 2 set of options below | |
| //Variables used in the following functions should be mentioned in the 'global' statement of each of them appropriately | |
| //=======Options 1======= | |
| $dmb_post_type = 'tribe_events'; | |
| $dmb_metabox_label = 'Other information'; | |
| $dmb_cf_name = 'tribe_events_miscinfo'; |
https://stackoverflow.com/a/18003462/348146
None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
Determine the package name of the app, e.g.
com.example.someapp. Skip this step if you already know the package name.
adb shell pm list packagesLook through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| /* CSS */ | |
| var devices = [ | |
| { name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' }, | |
| { name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' }, | |
| { name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' }, | |
| { name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
| { name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' }, | |
| { name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' }, |
| var emulatorDeviceList = [ | |
| { name: 'Amazon Kindle Fire HDX', width: 2560, height: 1600, ratio: 2 }, | |
| { name: 'Apple iPad', width: 1024, height: 768, ratio: 2 }, | |
| { name: 'Apple iPad Mini', width: 1024, height: 768, ratio: 1 }, | |
| { name: 'Apple iPhone 4', width: 320, height: 480, ratio: 2 }, | |
| { name: 'Apple iPhone 5', width: 320, height: 568, ratio: 2 }, | |
| { name: 'Apple iPhone 6', width: 375, height: 667, ratio: 2 }, | |
| { name: 'Apple iPhone 6 Plus', width: 414, height: 736, ratio: 3 }, | |
| { name: 'BlackBerry PlayBook', width: 1024, height: 600, ratio: 1 }, | |
| { name: 'BlackBerry Z30', width: 360, height: 640, ratio: 2 }, |
| # Source: | |
| # https://www.cloudflare.com/ips | |
| # https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- | |
| for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
| for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
| # Avoid racking up billing/attacks | |
| # WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable. | |
| iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP |
| // ==UserScript== | |
| // @name Performance testing | |
| // @namespace http://your.homepage/ | |
| // @version 0.1 | |
| // @description enter something useful | |
| // @author You | |
| // @match http://www.some-website.com/* | |
| // @grant none | |
| // ==/UserScript== |