Skip to content

Instantly share code, notes, and snippets.

cmake_minimum_required(VERSION 3.13)
# Set the AWS service components used by this project.
set(SERVICE_COMPONENTS s3)
# Set this project's name.
project("hello_s3")
# Set the C++ standard to use to build this target.
# At least C++ 11 is required for the AWS SDK for C++.
@jrdi
jrdi / boxstarter.ps1
Last active August 26, 2019 07:23 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jrdi
jrdi / boxstarter
Last active September 8, 2018 12:32
# Configure Windows
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Fonts
choco install inconsolata -y
# Windows Settings
Disable-BingSearch
Disable-GameBarTips
#include "opencv2/core/core.hpp"
#include "itkObject.h"
#include "itkObjectFactory.h"
#include "BoostTestTargetConfig.h"
void CheckInputArrayChannels( cv::InputArray samples )
{
cv::Mat matrix = samples.getMat();
if( matrix.channels() != 1 )
@jrdi
jrdi / gist:6864853
Created October 7, 2013 09:08 — forked from ErneX/gist:6859700
Wake On Lan:
Mi router es un Comtrend y este router en particular la tabla ARP no hay manera de crear entradas permanentes desde la UI web, pero se puede via telnet. No recuerdo ahora exactamente bajo cuales circunstancias se olvidaba de las entradas ARP que se creaban automáticamente, creo que si reiniciabas el router las perdía o algo. Entonces busqué la manera de recrear estas entradas de forma automática periódicamente mediante un script para que estuviesen al día y poder enviar el magic packet y que el router supiese a cual ordenador pasarlo.
La solución con la que he dado es esta:
1.
Instalar SleepWatcher http://www.bernhard-baehr.de es un programa que lo instalas con launchd y te permite ejecutar scripts cuando el ordenador se duerme o despierta.
2.
@jrdi
jrdi / gist:6063555
Last active December 20, 2015 03:29
// entropy(hsv)
// it computes the histogram on a neighborhood
Features::VectImgType Features::Histogram (const VectUcharPointType& pt)
{
VectImgType hist( 3, cv::Mat::zeros(256, 1, CV_8UC1) );
for (VectUcharPointType::const_iterator it = pt.begin();
it != pt.end();
++it )
{
plugin.onMessageInsertion = function (event) {
var content;
content = Talker.getLastInsertion().replace(/:[\w_+]+:/g, function (match) {
var emoji = match,
filename = (emoji == ':+1:' ? ':plus1:' : emoji).replace(/:/g, '');
return "<img class=\"emoji\" title=\"" + emoji + "\" alt=\"" + emoji + "\" height=\"20\" width=\"20\" align=\"absmiddle\" src=\"https://teambox.com/assets/emojis/" + filename + ".png\">"
});
return content;
};
@jrdi
jrdi / .gitignore
Created November 27, 2012 22:12
All files in directories
.DS_Store
DB*
Config*
@jrdi
jrdi / mail_queue.rb
Created February 26, 2012 16:48
A simple module to enqueue emails with Resque
module MailQueue
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
def queue
:mailers
end