Skip to content

Instantly share code, notes, and snippets.

Avatar

Gabriele C. sgdc3

  • Appfactory Srl
  • Genova, Italy
  • Twitter @sgdc3
View GitHub Profile
@sgdc3
sgdc3 / custom.maven.gradle
Last active Jun 3, 2019
Deploy for codemc
View custom.maven.gradle
publishing {
repositories {
maven {
credentials {
username = project.getProperty('deployUser')
password = project.getProperty('deployPass')
}
name = "codemc"
url = version.endsWith('SNAPSHOT') ? 'https://repo.codemc.org/repository/maven-snapshots/' :
'https://repo.codemc.org/repository/maven-releases/'
View cpp_wsl.ps1
# C/C++ development environment setup script for Windows + WSL
# Author: sgdc3
$defaultApps = @(
"Microsoft.BingFinance"
"Microsoft.3DBuilder"
"Microsoft.BingFinance"
"Microsoft.BingNews"
"Microsoft.BingSports"
"Microsoft.BingWeather"
View custom.maven.gradle
configurations {
deployerJars
}
dependencies {
deployerJars "org.apache.maven.wagon:wagon-ssh:2.10"
}
apply plugin: 'maven'
@sgdc3
sgdc3 / main.js
Last active Jan 15, 2019
TwitchNotificationBot
View main.js
// Include Telegraf module
const Telegraf = require('telegraf');
const twitch = require('twitch-api-v5');
twitch.clientID = '';
const bot = new Telegraf('');
const channelName = '';
const telegramGroupId = -1;
const pinNotification = true;
@sgdc3
sgdc3 / .gitignore
Created Aug 22, 2018
Gitignore for maven java projects
View .gitignore
# Git
*.orig
!.gitignore
# Windows
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
@sgdc3
sgdc3 / restream.sh
Last active May 23, 2018
Restream: a simple bash script to split an rtmp video stream by using ffmpeg.
View restream.sh
#!/bin/bash
LISTEN_URL='rtmp://0.0.0.0:5555'
# Youtube stream
YT_URL='rtmp://a.rtmp.youtube.com/live2'
YT_VIDEO_ARGS='-c:v copy'
YT_AUDIO_ARGS='-c:a copy'
# Keys
View keybase.md

Keybase proof

I hereby claim:

  • I am sgdc3 on github.
  • I am sgdc3 (https://keybase.io/sgdc3) on keybase.
  • I have a public key ASA01E_2ixq30AgDSbsDFwXj1aG7TeoMwzXOiTQiUcDy-Ao

To claim this, I am signing this object:

View codemc-style.css
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.png
View nomorebots-bot.js
module['exports'] = function echoBot (hook) {
var request = require('request');
request
.post('https://api.telegram.org/bot' + hook.env.nomorebot_bot_key + '/sendMessage')
.form({
"chat_id": hook.params.message.chat.id,
"text": hook.params.message.text
});
};
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.filoghost</groupId>
<artifactId>holographicdisplays</artifactId>
<version>v2.2.5-TEST1</version>
<packaging>jar</packaging>