create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
/** | |
* loadJSONP( url, hollaback [, context] ) -> Null | |
* - url (String): URL to data resource. | |
* - hollaback (Function): Function to call when data is successfully loaded, | |
* it receives one argument: the data. | |
* - context (Object): Context to invoke the hollaback function in. | |
* | |
* Load external data through a JSONP interface. | |
* | |
* ### Examples |
function convertMS(ms) { | |
var d, h, m, s; | |
s = Math.floor(ms / 1000); | |
m = Math.floor(s / 60); | |
s = s % 60; | |
h = Math.floor(m / 60); | |
m = m % 60; | |
d = Math.floor(h / 24); | |
h = h % 24; | |
return { d: d, h: h, m: m, s: s }; |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
from google.appengine.ext import db, ndb | |
from google.appengine.datastore import entity_pb | |
def db_entity_to_protobuf(e): | |
return db.model_to_protobuf(e).Encode() | |
def protobuf_to_db_entity(pb): | |
# precondition: model class must be imported | |
return db.model_from_protobuf(entity_pb.EntityProto(pb)) |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
1. Use openssl | |
openssl smime -in /path/to/your.mobileprovision -inform der -verify | |
2. Use security command | |
security cms -Di /path/to/your.mobileprovision |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin