Skip to content

Instantly share code, notes, and snippets.

View rudygt's full-sized avatar
💭
code ftw

Rudy Alvarez rudygt

💭
code ftw
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FROM openjdk:15-jdk-slim as bulid
WORKDIR application
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY src src
RUN ./mvnw install -DskipTests
@publik-void
publik-void / sin-cos-approximations-gist.adoc
Last active June 21, 2024 21:53
Fast MiniMax Polynomial Approximations of Sine and Cosine

Fast MiniMax Polynomial Approximations of Sine and Cosine

@diversit
diversit / AWSDeserializer.scala
Created November 1, 2017 19:50
Deserialize json into a DynamodbEvent
package json;
import com.amazonaws.services.dynamodbv2.model.OperationType;
import com.amazonaws.services.dynamodbv2.model.StreamViewType;
import com.amazonaws.services.lambda.runtime.events.DynamodbEvent;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install 7zip /y
choco install docker-for-windows /y
choco install dotpeek /y
choco install git /y
choco install git-desktop /y
choco install googlechrome /y
choco install brave /y
choco install mousewithoutborders /y
@jessfraz
jessfraz / go-release-stats.md
Last active March 9, 2019 02:32
stats on the go 1.7 release for fun

Setup:

# set CONTRIBUTORS file to mailmap to remove duplicate emails for the same name
# see: https://git-scm.com/docs/git-shortlog#_mapping_authors
$ git config mailmap.file CONTRIBUTORS

Top 10 contributors (all):

@NickCraver
NickCraver / ExampleUsage.cs
Last active October 16, 2024 02:37
Code to mark a SQL string before it's passed to Dapper.
public static List<T> Query<T>(this DataContext db, string sql, object param = null, int? commandTimeout = null, IDbTransaction transaction = null, [CallerFilePath]string fromFile = null, [CallerLineNumber]int onLine = 0, string comment = null)
{
using (db.Connection.EnsureOpen())
{
try
{
return db.Connection.Query<T>(MarkSqlString(sql, fromFile, onLine, comment), param, transaction ?? db.Transaction, true, commandTimeout).AsDapperList();
}
catch (SqlException ex) when (ex.Is(SqlErrorCode.DatabaseReadOnly_3906))
{
@NickCraver
NickCraver / DmpAnalysis.linq
Last active May 1, 2024 21:09
DMP Analysis in LinqPad
<Query Kind="Program">
<NuGetReference Prerelease="true">Microsoft.Diagnostics.Runtime</NuGetReference>
<Namespace>Microsoft.Diagnostics.Runtime</Namespace>
<Namespace>System</Namespace>
<Namespace>System.IO</Namespace>
<Namespace>System.Linq</Namespace>
<Namespace>System.Text</Namespace>
<Namespace>Microsoft.Diagnostics.Runtime.Utilities</Namespace>
</Query>
@ochinchina
ochinchina / docker_1.9_on_ubuntu_14.04.md
Created September 6, 2015 08:56
install the docker 1.9-dev to ubuntu 14.04

###add patch

get the script from https://get.docker.com/ubuntu/, the script is:

# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
	apt-get update
	apt-get install -y apt-transport-https
fi