Skip to content

Instantly share code, notes, and snippets.

View mtorromeo's full-sized avatar

Massimiliano Torromeo mtorromeo

View GitHub Profile
@mtorromeo
mtorromeo / artera-sms.php
Last active August 29, 2015 13:57
Esempio di invio SMS Artera
<?php
//open connection
$ch = curl_init("https://www.artera.it/invio_sms_post.php");
//POST data
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
"mittente" => "Foo Srl",
"username" => "NOMEUTENTE",
"password" => "PASSWORD",
"operation" => "invioSMS",
@mtorromeo
mtorromeo / PKGBUILD
Created May 22, 2014 09:30
libuv 0.11.25 with inet_pton6.patch
# $Id: PKGBUILD 109507 2014-04-15 09:32:10Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=libuv
pkgver=0.11.25
pkgrel=1
pkgdesc="A new platform layer for Node.JS"
arch=('i686' 'x86_64')
url="https://github.com/joyent/libuv"
license=('custom')
@mtorromeo
mtorromeo / parallelrun.py
Created June 5, 2014 08:33
Parallelize shell processes enforcing a concurrency limit using python3 and asyncio
import asyncio
concurrency_sem = asyncio.Semaphore(3)
@asyncio.coroutine
def run(process):
yield from concurrency_sem.acquire()
print("Running {}...".format(process))
proc = yield from asyncio.create_subprocess_shell(process)
yield from proc.communicate()
@mtorromeo
mtorromeo / gitlab-reimplement-room-setting.patch
Last active August 29, 2015 14:08
GitLab re-implement room setting
diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb
index 963f544..6f235fd 100644
--- a/app/models/project_services/slack_service.rb
+++ b/app/models/project_services/slack_service.rb
@@ -13,8 +13,9 @@
#
class SlackService < Service
- prop_accessor :webhook
+ prop_accessor :webhook, :room

Keybase proof

I hereby claim:

  • I am mtorromeo on github.
  • I am mtorromeo (https://keybase.io/mtorromeo) on keybase.
  • I have a public key ASC18I8Z1TeMbDsrKH3NFPKahRYquaiNneZ5aNakiEdhgAo

To claim this, I am signing this object:

@mtorromeo
mtorromeo / PKGBUILD
Last active August 3, 2017 12:52
Split passenger package
# $Id: PKGBUILD 247762 2017-08-03 10:17:52Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgbase=passenger
pkgname=(passenger mod_passenger nginx-mod-passenger)
pkgver=5.1.7
pkgrel=2
_nginxver=1.12.1
pkgdesc="Fast and robust web server and application server for Ruby, Python and Node.js"
arch=('i686' 'x86_64')
@mtorromeo
mtorromeo / patternfly-mail.vue
Created November 16, 2017 18:09
Vue-Patternfly full table example
<template>
<div>
<pf-toolbar ref="toolbar" class="table-view-pf-toolbar"
:filters.sync="filters"
:filter-fields="filterFields"
:result-count="mails.total"
:columns="['Date', 'From', 'To', 'Subject', 'Size', 'Attachments']"
:picked-columns.sync="columns"
view="table"
/*This code is automatically generated
*/pub mod endpoints { use super :: http :: * ; use super :: params :: * ;
# [ derive ( Debug , PartialEq , Clone ) ] enum CatFielddataUrlParams < 'a > { None , Fields ( Fields < 'a > ) , } impl < 'a > CatFielddataUrlParams < 'a > { pub fn url ( self ) -> UrlPath < 'a > { match self { CatFielddataUrlParams :: None => { UrlPath :: from ( "/_cat/fielddata" ) } CatFielddataUrlParams :: Fields ( ref fields ) => { let mut url = String :: with_capacity ( 16usize + fields . len ( ) ) ; url . push_str ( "/_cat/fielddata/" ) ; url . push_str ( fields . as_ref ( ) ) ; UrlPath :: from ( url ) } } } } # [ derive ( Debug , PartialEq , Clone ) ] # [ doc = "`Get: /_cat/fielddata`\n\n[Elasticsearch Documentation](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html)" ] pub struct CatFielddataRequest < 'a > { pub url : UrlPath < 'a > } impl < 'a > CatFielddataRequest < 'a > { # [ doc = "Request to: `/_cat/fielddata`" ] pub fn new ( ) -> Self { CatFielddataRe
diff --git a/builtin/logical/ssh/path_sign.go b/builtin/logical/ssh/path_sign.go
index a64edfa2d..f3c83f765 100644
--- a/builtin/logical/ssh/path_sign.go
+++ b/builtin/logical/ssh/path_sign.go
@@ -9,6 +9,7 @@ import (
"crypto/sha256"
"errors"
"fmt"
+ "io"
"strconv"
@mtorromeo
mtorromeo / PKGBUILD
Last active August 30, 2020 16:35
re2 PKGBUILD using cmake
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Alexandre Bique <bique.alexandre@gmail.com>
pkgname=re2
_re2ver=2020-08-01
pkgver=${_re2ver//-}
pkgrel=2
epoch=1