(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
chrome.webRequest.onHeadersReceived.addListener( | |
function (details) { | |
for (var i = 0; i < details.responseHeaders.length; ++i) { | |
if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') { | |
details.responseHeaders.splice(i, 1); | |
return { | |
responseHeaders: details.responseHeaders | |
}; | |
} | |
} |
<?php | |
// requires php5 | |
define('UPLOAD_DIR', 'images/'); | |
$img = $_POST['img']; | |
$img = str_replace('data:image/png;base64,', '', $img); | |
$img = str_replace(' ', '+', $img); | |
$data = base64_decode($img); | |
$file = UPLOAD_DIR . uniqid() . '.png'; | |
$success = file_put_contents($file, $data); | |
print $success ? $file : 'Unable to save the file.'; |
require(ggplot2) | |
theta <- seq(0,2*pi,length.out = 100) | |
circle <- data.frame(x = cos(theta), y = sin(theta)) | |
p <- ggplot(circle,aes(x,y)) + geom_path() | |
loadings <- data.frame(ir.pca$rotation, | |
.names = row.names(ir.pca$rotation)) | |
p + geom_text(data=loadings, | |
mapping=aes(x = PC1, y = PC2, label = .names, colour = .names)) + |
# -*- coding: utf-8 -*- | |
""" | |
An example flask application showing how to upload a file to S3 | |
while creating a REST API using Flask-Restful. | |
Note: This method of uploading files is fine for smaller file sizes, | |
but uploads should be queued using something like celery for | |
larger ones. | |
""" | |
from cStringIO import StringIO |
#!/bin/bash | |
# generate new personal ed25519 ssh key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network | |
eval "$(ssh-agent -s)" |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
var script = document.createElement("script"); | |
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); |
<?php die('This file is not really here!'); | |
/** | |
* ------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER --------------------- | |
* | |
* Implements code completion for CodeIgniter in phpStorm | |
* phpStorm indexes all class constructs, so if this file is in the project it will be loaded. | |
* ------------------------------------------------------------------- | |
* Drop the following file into a CI project in phpStorm | |
* You can put it in the project root and phpStorm will load it. |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_25/bin/java" 2 | |
sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_25/bin/java | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_25/bin/javac" 2 | |
sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_25/bin/javac | |
/usr/lib/mozilla/plugins | |
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/i386/libnpjp2.so | |
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so |