For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains 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
# Steps to install it | |
# 1. Open .bashrc with nano ~/.bashrc | |
# 2. Scroll to the bottom of the file | |
# 3. Copy and paste the code below | |
# 4. Reload your terminal just by closing it and reopen it or by calling source ~/.bashrc | |
# 5. Move to any git repo and ensure you have a prompt like the following dev0@dev0-Precision-7770 learning-hub (staging)$ | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' |
This file contains 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
04-05 17:25:45.202 1862-1864/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0 | |
04-05 17:25:45.202 1862-1864/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0] | |
04-05 17:25:45.218 862-2100/? E/ActivityManager: applyOptionsLocked: Unknown animationType=0 | |
04-05 17:25:45.741 14574-14601/? E/ReactNativeJS: No dimension set for key window | |
04-05 17:25:45.745 14574-14601/? E/ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication) | |
04-05 17:25:45.750 14574-14602/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules | |
Process: org.givesafe.merchant, PID: 14574 | |
com.facebook.react.common.JavascriptException: No dimension set for key window, stack: | |
value@77:706 | |
value@76:228 |
This file contains 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
{ | |
aps: { | |
alert: data, | |
sound: true, | |
badge: 0 | |
}, | |
data: data | |
} |
This file contains 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
Error:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: Could not parse POM https://oss.sonatype.org/content/repositories/snapshots/com/braintreepayments/api/braintree/2.5.3-SNAPSHOT/braintree-2.5.3-20170329.161535-1.pom | |
Error:java.lang.RuntimeException: Missing required attribute: dependency groupId | |
Error:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: Could not parse POM https://oss.sonatype.org/content/repositories/snapshots/com/braintreepayments/api/braintree/2.5.3-SNAPSHOT/braintree-2.5.3-20170329.161535-1.pom | |
Error:java.lang.RuntimeException: Missing required attribute: dependency groupId | |
Error:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: Could not parse POM https://oss.sonatype.org/content/repositories/snapshots/com/braintreepayments/api/braintree/2.5.3-SNAPSHOT/braintree-2.5.3-20170329.161535-1.pom | |
Error:java.lang.RuntimeException: Missing required attribute: dependency groupId | |
Error:o |
If you want to use curl or net-http/open-uri to access https resources, you will often (always?) get an error, because they don't have the large number of root certificates installed that web browsers have.
You can manually install the root certs, but first you have to get them from somewhere. This article gives a nice description of how to do that. The source of the cert files it points to is hosted by the curl project, who kindly provide it in the .pem format.
problem: Sadly, ironically, and comically, it's not possible to access that file via https! Luckily, the awesome curl project does provide us with the script that they use to produce the file, so we can do it securely ourselves. Here's how.
git clone https://github.com/bagder/curl.git
cd curl/lib
- edit
mk-ca-bundle.pl
and change:
This file contains 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
# After merging master into this branch, let's use the files from master and ignore our conflicts | |
git checkout --theirs some/file/in/my/repo/with/conflicts | |
# Now let's add those files into the commit | |
git add . | |
# This should result in something like this when running 'git status' | |
# On branch blah | |
# Your branch is up-to-date with 'origin/blah'. | |
# All conflicts fixed but you are still merging. | |
# (use "git commit" to conclude merge) | |
# Changes to be committed: |
This file contains 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 socket = require('socket.io-client')('http://192.168.129.194:9000'); | |
var fs = require("fs"); | |
socket.on('connect', function(){ | |
console.log('Connected!'); | |
//******* | |
//TODO: User fedex guy picture | |
var image_origial = "back_to_the_future.jpg"; | |
fs.readFile(image_origial, "base64", function(err,data){ | |
if(err){ | |
console.log(err); |
This file contains 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
function _cancelQueuedTasks(configs, tasks, callback){ | |
var worker = new ironworker.Client({token: config.IRON_WORKER_TOKEN, project_id: config.IRON_WORKER_PROJECT_ID}); | |
newerTasks = tasks.slice(2, tasks.length); | |
log(newerTasks.length + " newerTasks are going to be deleted") | |
async.eachSeries(newerTasks, function(task, cb){ | |
log("Canceling task: " + task.id + " [RMCaseJobScheduler]") | |
worker.tasksCancel(task.id,function(error, results){ | |
log("=======Results======") | |
log(JSON.stringify(results)) | |
log("======Errors========") |