- Open Automator
- Create a new Service
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction - Set the script action to
/usr/local/bin/atom -n "$@" - Set “Pass input” to
as arguments - Save as
Open in Atom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import lombok.extern.slf4j.Slf4j; | |
| import lombok.val; | |
| import org.springframework.http.HttpStatus; | |
| import org.springframework.http.MediaType; | |
| import org.springframework.web.filter.OncePerRequestFilter; | |
| import org.springframework.web.util.ContentCachingRequestWrapper; | |
| import org.springframework.web.util.ContentCachingResponseWrapper; | |
| import javax.servlet.FilterChain; | |
| import javax.servlet.ServletException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command: | |
| pm list packages -f | |
| pm list packages -f | grep "opera" // for specific apps name | |
| pm uninstall -k --user 0 package_name | |
| example: | |
| 1. first list package to uninstall, and example line apps | |
| shell@grandpplte:/ $ pm list packages -f | grep "line" | |
| result: | |
| package:/data/app/jp.naver.line.android-1/base.apk=jp.naver.line.android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| android { | |
| signingConfigs { | |
| release | |
| } | |
| buildTypes { | |
| release { | |
| signingConfig signingConfigs.release | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Update all expired keys from Ubuntu key server in one command: | |
| sudo apt-key list | \ | |
| grep "expired: " | \ | |
| sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \ | |
| xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys | |
| Command explanation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var crypto = require('crypto'); | |
| // the Base64 encoded Google Play license key / Base64-encoded RSA public key from the Google Play Dev Console | |
| var publicKey = "ABCEDF1234...."; | |
| /** sample | |
| { | |
| "orderId":"12999763169054705758.1371079406387615", | |
| "packageName":"com.example.app", | |
| "productId":"exampleSku", |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| ) |
NewerOlder