Skip to content

Instantly share code, notes, and snippets.

View jonasermert's full-sized avatar
:octocat:

Jonas jonasermert

:octocat:
View GitHub Profile
@jonasermert
jonasermert / SendingMailWithGolang.go
Created January 28, 2022 01:03
Sending mail with Goland Standard Library
package mail
from := "Your email adress"
auth := smtp.PlainAuth("Username", from, "", "Serveradress")
err = smtp.SendMail("Server:Port", auth, from, []string{"emailOfRecipient"}, []byte{"Your email content"})
if err != nil {
log.Println(err)
}
/*
author: Jonas Ermert
year: 2022
*/
package main
import (
"fmt"
"golang.org/x/crypto/bcrypt"
import java.io.FileInputStream;
import java.util.Properties;
public class ReadPropertiesFile {
public static void main(String[] args) {
FileInputStream fis = new FileInputStream("Path to file");
Properties prop = new Properties();
prop.load(fis);
@jonasermert
jonasermert / hover-button-animation-with-transition-2.markdown
Created October 29, 2021 22:58
hover button animation with transition #2
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@jonasermert
jonasermert / String in String suchen PHP
Created October 22, 2017 08:12
String in String suchen PHP
function outputStringPositionsFunctionNew2($longText, $searchTexts){
foreach ($searchTexts as $searchText){
$tmpArray = array();
if(preg_match(‚/‘.$searchText.’/s‘,$longText,$tmpArray,PREG_OFFSET_CAPTURE))
echo $tmpArray[0][1].“\n“;
}
}