This simple script creates a new element in context menu that opens current directory (background click) or a list of directory (selected elements) as project folder. It does not open single files (that should be done as MIME type, search on google!)
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
1. install telnet on your computer | |
2. install expect on your comptuer | |
3. create the a file withthe code of turnOnTV.sh | |
4. change permissions on that file (chmod 500 turnOnTV.sh) | |
5. create eventually a cron job to run this script.(50 5 * * * expect ~/scripts/turnOnTV.sh) | |
You need to set permission to file be read by the owner (400) and allow it execution by the owner (100). |
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
#!/bin/sh -e | |
hostname=$1 | |
device=$2 | |
file=$HOME/.dynv6.addr6 | |
[ -e $file ] && old=`cat $file` | |
if [ -z "$hostname" -o -z "$token" ]; then | |
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]" | |
exit 1 | |
fi |
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
<?php | |
echo "<br/>"; | |
echo "<br/>"; | |
$output =shell_exec('wakeonlan xy:xy:xy:xy:xy:xy'); | |
echo "<pre>$output</pre>"; | |
echo "wake up workstation"; | |
echo "<br/>"; | |
echo "<br/>"; |
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
#!/usr/bin/env bash | |
# Test script for checking if Cuda and Drivers correctly installed on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 | |
fi | |
################################### | |
# Ubuntu 14.04 Install script for: |
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
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
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
sleep 3; xset dpms force off | |
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
Eigen::Quaternionf Common::GetQuaternionFromDirVectors( | |
const Eigen::Vector3f& upwards, const Eigen::Vector3f& forwards) { | |
Eigen::Vector3f right = forwards.cross(upwards); | |
#define m00 right.x() | |
#define m01 forwards.x() | |
#define m02 upwards.x() | |
#define m10 right.y() | |
#define m11 forwards.y() | |
#define m12 upwards.y() |
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
// Reference: http://mathworld.wolfram.com/Tetrahedron.html | |
void Common::CalculateObjectsProperties( | |
const pcl::PointCloud<pcl::PointXYZ>::Ptr& cloud, | |
Eigen::Vector3d* center_of_mass, double* totalVolume, double* weight) { | |
LOG(INFO) << "CalculateObjectsProperties start.\n"; | |
CHECK_NOTNULL(cloud.get()); | |
CHECK_NOTNULL(center_of_mass); | |
CHECK_NOTNULL(totalVolume); | |
CHECK_NOTNULL(weight); |
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
# This line imports the modules we will need. The first is the sys module used | |
# to read the command line arguments. Second the Python Imaging Library to read | |
# the image and third numpy, a linear algebra/vector/matrix module. | |
import sys; from PIL import Image; import numpy as np | |
# This is a list of characters from low to high "blackness" in order to map the | |
# intensities of the image to ascii characters | |
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@')) | |
# Check whether all necessary command line arguments were given, if not exit and show a |
OlderNewer