Skip to content

Instantly share code, notes, and snippets.

View skarllot's full-sized avatar
💭
I may be slow to respond.

Fabrício Godoy skarllot

💭
I may be slow to respond.
View GitHub Profile
@skarllot
skarllot / .gitlab-ci.yml
Created June 20, 2018 20:28 — forked from ashalkhakov/.gitlab-ci.yml
Running .NET 3.5 CF builds under Docker for Windows
# this is the GitLab-CI file for building the image
variables:
CURRENT_IMAGE_TAG: rfid-applied/netcf35_build_environment:dev
stages:
- dockerize
dockerize:
stage: dockerize
script:
@skarllot
skarllot / CancellationTokenAsynchronousExtensions.cs
Created April 24, 2018 20:12
Enable await for CancellationToken
using System;
using System.Runtime.CompilerServices;
using System.Threading;
public static class CancellationTokenAsynchronousExtensions
{
public static CancellationTokenAwaiter GetAwaiter(this CancellationToken cancellationToken)
{
return new CancellationTokenAwaiter(cancellationToken);
}
@skarllot
skarllot / AmazonEBConfigurationProvider.cs
Last active November 29, 2019 07:05
Amazon Elastic Beanstalk variables configuration provider implementation for Microsoft.Extensions.Configuration.
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Linq;
namespace SklLib.Configuration.Amazon
{
public class AmazonEBConfigurationProvider : ConfigurationProvider
{
private const string ConfigurationFilename = @"C:\Program Files\Amazon\ElasticBeanstalk\config\containerconfiguration";
You can use Visual Studio 2015 to compile to Compact Framework 3.5 by following the instructions below:
- Install the '.NET Compact Framework 3.5 Redistributable';
- Copy files from '*C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE*';
- Paste the files at '*C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\\.NETFramework\v3.5\Profile\CompactFramework*' directory;
- Create a directory named '*RedistList*';
- Create a file named '*FrameworkList.xml*' at '*RedistList*' directory;
- Set the follwing content to the file created:
<?xml version="1.0" encoding="utf-8"?>
@skarllot
skarllot / net35-cf.md
Last active February 26, 2025 20:28
Build .NET Compact Framework 3.5

Install

Force MSBuild support

  • Copy files and directories from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5';
  • Copy files from 'C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\CompactFramework' directory;
  • Create 'RedistList' directory inside created 'CompactFramework' directory;
  • Create 'FrameworkList.xml' inside 'RedistList' directory and type the following:
@skarllot
skarllot / Makefile.makefile
Created May 3, 2016 21:24
Makefile to merge coverage data from all subpackages (Golang)
.PHONY: test-cover-html
PACKAGES = $(shell find ./ -type d -not -path '*/\.*')
test-cover-html:
echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES),\
go test -coverprofile=coverage.out -covermode=count $(pkg);\
tail -n +2 coverage.out >> coverage-all.out;)
go tool cover -html=coverage-all.out
@skarllot
skarllot / cue_splitting.sh
Created April 24, 2016 01:47
CUE Splitting
# Ref: https://wiki.archlinux.org/index.php/CUE_Splitting
shnsplit -f audio.cue -t "%n. %p - %t" -o flac audio.flac
cuetag.sh audio.cue [01]*.flac
@skarllot
skarllot / build_module.gradle
Created April 17, 2016 05:09
Distribute Android library to jCenter
// Ref: http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'fb-like'
publishedGroupId = 'com.inthecheesefactory.thecheeselibrary'
libraryName = 'FBLike'
@skarllot
skarllot / soap_client.js
Created April 1, 2016 03:45
SOAP client example (Node.JS)
// https://tonicdev.com/56fde983d60906110030ba19/56fde983d60906110030ba1a
var soap = require('soap');
var url = 'http://www.webservicex.net/geoipservice.asmx?WSDL';
var args = {IPAddress: '8.8.8.8'};
soap.createClient(url, function(err, client) {
client.GetGeoIP(args, function(err, result) {
console.log(result.GetGeoIPResult);
});
});
@skarllot
skarllot / heroku_entropy.sh
Created March 3, 2016 21:39 — forked from jwilkins/heroku_entropy.sh
monitor entropy on heroku dynos
#!/bin/bash
DATE="date +%Y%m%d%H%M%S"
RDATE="date +%Y%m%d%H%M%S"
IP='curl icanhazip.com'
ENTROPY='cat /proc/sys/kernel/random/entropy_avail'
LOG='heroku-entropy.log'
touch $LOG
while true; do
heroku run "echo \"$($DATE),\$($RDATE),\$($IP),\$DYNO,\$($ENTROPY)\"" 2>&1 | egrep "^20" >> $LOG;
done