This variation of a clustered force layout uses D3’s circle-packing layout to initialize node positions.
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
# Cygwin's cp discards ACLs (complex windows permissions). You have to copy them separately as follows: | |
# First copy files themselves, with timestamps: | |
cp -a folder1 folder2 | |
# Set all ACLs of copies to ACLs of originals: | |
cd folder2 | |
find . | while read f ; do getfacl ../folder1/"$f" | setfacl -f - "$f" ; done | |
# or when permissions are equal for all files / directories: | |
getfacl folder1 > folder-perms |
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
#!bin/bash | |
#set -xv | |
cpSource='your/root/folderxxx' | |
cpDest='your/root/folderxxx' | |
verbose=false | |
case "$1" in | |
-v) | |
verbose=true;; |
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
Go to Visual Studio Tools > start Developer Command Prompt for VS2013 | |
msbuild yourprojectname.build /target:buildall /property:BUILD_NUMBER=1 |
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
rm -rf ~/.gnupg/ | |
curl -#LO https://rvm.io/mpapis.asc | |
gpg --import mpapis.asc | |
\curl -sSL https://get.rvm.io | bash -s stable |
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
app.directive("child", function() { | |
return { | |
... | |
require: ["^parent", "child"], | |
link: function(scope, elem, attrs, ctrls) { | |
var parentController = ctrls[0], | |
childController = ctrls[1]; | |
childController.setParent(parentController); | |
}, |
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
*** 1. Remove --no-act for run the commands for real. | |
*** 2. Find out the range of your kernel version numbers and replace the numbers below. e.g. {start..end} | |
Finding out versions: | |
dpkg -l | grep linux-image | |
Purging the images: | |
sudo dpkg -P --no-act --force-depends linux-image-3.13.0-{32..46}-generic | |
sudo dpkg -P --no-act --force-depends linux-image-extra-3.13.0-{32..46}-generic | |
sudo dpkg -P --no-act --force-depends linux-headers-3.13.0-{32..46}-generic |
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 a = function(y) { | |
var z = 1; //shared between instances, accessible via prototype method | |
var x = 2; //shared between instances | |
var self = this; | |
this.y = null; //not shared | |
var impl = function(y) { | |
}; | |
var init = function(y) { |
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
url - https://aws.amazon.com/blogs/security/a-safer-way-to-distribute-aws-credentials-to-ec2/ | |
Finding hard-coded credentials in your code | |
Hopefully you’re excited about deploying credentials to EC2 that are automatically rotated. Now that you’re using Roles, a good security practice would be to go through your code and remove any references to AKID/Secret. We suggest running the following regular expressions against your code base: | |
Search for access key IDs: (?<![A-Z0-9])[A-Z0-9]{20}(?![A-Z0-9]). In English, this regular expression says: Find me 20-character, uppercase, alphanumeric strings that don’t have any uppercase, alphanumeric characters immediately before or after. | |
Search for secret access keys: (?<![A-Za-z0-9/+=])[A-Za-z0-9/+=]{40}(?![A-Za-z0-9/+=]). In English, this regular expression says: Find me 40-character, base-64 strings that don’t have any base 64 characters immediately before or after. | |
If grep is your preferred tool, run a recursive, Perl-compatible search using the following commands |
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
url - https://forums.aws.amazon.com/message.jspa?messageID=671934 | |
You could verify that they match a regular expression that describes every access key and every secret key (the AWS Security Blog has regexes you could use), but there's no way for the SDK to check if your credentials are valid without sending a request to a service. (Otherwise, the SDK would need to ship with everyone's access keys embedded in its source.) | |
If you do make a call to a service, though, the remote service will be able to validate your credentials and respond accordingly. If you call $s3Client->listBuckets() before calling $s3Client->registerStreamWrapper(), the client will call the service and convert the error to an exception if your credentials are invalid. |