Skip to content

Instantly share code, notes, and snippets.

View joeydumont's full-sized avatar
💭
I should be writing.

Joey Dumont joeydumont

💭
I should be writing.
View GitHub Profile
@joeydumont
joeydumont / resize_images.js
Last active February 28, 2023 18:27
NodeJS code to resize images while keeping the original aspect ratio
// Create clients outside of the handler
// Create a client to read objects from S3
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
// Libraries for image resize.
const stream = require('stream');
@joeydumont
joeydumont / Duplicati.patch
Created September 27, 2017 15:49
Duplicati.Server.exe as duplicati user
diff --git a/PKGBUILD b/PKGBUILD
index 7af25ea..f82574a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=duplicati-latest
pkgver=2.0.2.8
-pkgrel=1
+pkgrel=2
diff -aur scorep-3.1.pristine/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c scorep-3.1.new/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c
--- scorep-3.1.pristine/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-06-01 11:14:52.630876809 -0400
+++ scorep-3.1.new/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-06-01 11:20:59.546718442 -0400
@@ -194,7 +194,7 @@
TREE_TYPE( region_descr_value ) );
/* Align the struct generously, so that it works for 32 and 64 bit */
- DECL_ALIGN( region_descr_var ) = 64 * BITS_PER_UNIT;
+ SET_DECL_ALIGN(region_descr_var, 64 * BITS_PER_UNIT );// == 64 * BITS_PER_UNIT;
DECL_USER_ALIGN( region_descr_var ) = 1;
@joeydumont
joeydumont / test_bessel.cpp
Last active August 5, 2016 14:57
Simple test of the precision of complex_bessel
#include <complex_bessel.h>
#include <iostream>
#include <iomanip>
int main(int argc, char* argv[])
{
std::cout << std::setprecision(20) << "complex_bessel: besselI(1,5) = " << sp_bessel::besselI(1,5) << std::endl;
std::cout << std::setprecision(20) << "besselI(1,5)[complex_bessel]- besselI(1,5)[matlab] = " << sp_bessel::besselI(1,5)-24.335642142450530 << std::endl;
std::cout << std::setprecision(20) << "besselI(1,5)[complex_bessel]-besselI(1,5)[WolframAlpha] = " << sp_bessel::besselI(1,5)-24.33564214245052719914305045176000846056487436829889815840 << std::endl;
return 0;
@joeydumont
joeydumont / CMakeLists.patch
Created April 24, 2015 11:42
Compilation attempt for ue4-git 4.7.6
diff -aur ue4-git.pristine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/CMakeLists.txt ue4-git.new/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/CMakeLists.txt
--- ue4-git.pristine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/CMakeLists.txt 2015-04-24 07:15:12.477480633 -0400
+++ ue4-git.new/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/CMakeLists.txt 2015-04-24 07:27:13.645362020 -0400
@@ -5,13 +5,13 @@
set(CMAKE_CXX_FLAGS "-std=c++11")
-find_package(Qt4 QUIET COMPONENTS QtGui)
+#find_package(Qt4 QUIET COMPONENTS QtGui)
find_package(Qt5Widgets QUIET)
@joeydumont
joeydumont / PKGBUILD
Created April 15, 2015 04:48
PKGBUILD-mendeleydesktop
#Maintainer:xgdgsc<xgdgsc@gmail.com>
pkgname=mendeleydesktop
pkgver=1.13.8
pkgrel=1
pkgdesc="Academic software for managing and sharing research papers (desktop client)"
url=http://www.mendeley.com/release-notes/
arch=(i686 x86_64)
depends=(python2 qtwebkit)
license=(custom:mendeley_eula)
@joeydumont
joeydumont / PKGBUILD
Last active August 29, 2015 14:16
PKGBUILD for med-openmpi
# Maintainer: Martin Ortbauer <mortbauer@gmail.com>
# Original: Michele Mocciola <mickele>
# Contributor: Brice Méalier <mealier_brice@yahoo.fr>
# Modified by: César Vecchio <cesar UNDERSTRIKE vecchio AT yahoo DOT com>
pkgname=med-openmpi
pkgver=3.0.8
pkgrel=1
pkgdesc="MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - MED is code-aster exchange module linked to hdf5"
url="http://www.code-aster.org/outils/med/"
@joeydumont
joeydumont / PKGBUILD-onedrive-d-git
Created March 4, 2015 19:50
PKGBUILD for onedrive-d-git
# Maintainer: Pietro Brenna <pietrobrenna@zoho.com>
pkgname=onedrive-d-git
pkgver=20150227.g84c5956
pkgdesc="Client daemon for Microsoft OneDrive service"
source=('git://github.com/xybu92/onedrive-d.git' 'onedrive-d.desktop' 'setup.patch')
md5sums=('SKIP'
'8077d9697c922e003b8addbf243b33a4'
'0e71e4cb891b9d5e42b1c3a1f1a4451a')
arch=('i686' 'x86_64')
license=('LGPL')
# Contributor: Gleidson <gleidson_el@yahoo.com.br>
# Maintainer: Carl <carl.rogers@gmail.com>
pkgname=blitz
pkgver=0.10
pkgrel=5
pkgdesc="C++ Class library for scientific computing"
arch=('i686' 'x86_64')
url="http://www.sourceforge.net/projects/blitz/"
license=('GPL''custom')
@joeydumont
joeydumont / PKGBUILD
Created August 26, 2014 15:20
PKGBUILD for pagmo-git
# Maintainer: Benjamin Chretien <chretien at lirmm dot fr>
pkgname=pagmo-git
pkgver=20140826
pkgrel=1
pkgdesc="Perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model, git version."
arch=('i686' 'x86_64')
url="https://github.com/esa/pagmo"
license=('GPLv3')
depends=('boost')
optdepends=('blas' 'gsl' 'ipopt' 'nlopt' 'python')