Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Web.Mvc;
using System.Web.Mvc.Html;
public static class EnumEditorHtmlHelper
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace My.Namespace.Helper
{
public static class RepositoryExtensions
{
public static void UpdateCollection<T>(this IRepository<T> repository, ICollection<T> updatedEntities, Func<T, bool> queryForExisting, Func<T, T> bindAdded = null)
@joargp
joargp / ImageReader.java
Created March 14, 2014 10:00
Asyncronous image reader/loader for android
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Handler;
import android.widget.ImageView;
import java.io.File;
web: node server
@joargp
joargp / gist:2c2feede25f472cf1916
Created March 16, 2015 14:38
Excel export C#
// nuget: install-package ClosedXML
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ClosedXML.Excel;
@joargp
joargp / ExcelExport.cs
Created March 16, 2015 15:54
Excel generation C#
namespace OfficeGreier.Controllers
{
public class DefaultController : Controller
{
// GET: Default
public ActionResult Index()
{
var wb = new XLWorkbook();
var ws = wb.Worksheets.Add("AutoFilter");

Keybase proof

I hereby claim:

  • I am joargp on github.
  • I am joargp (https://keybase.io/joargp) on keybase.
  • I have a public key whose fingerprint is 659B 24EF 6C7A F107 2DE4 51FA 1385 8538 C8B4 C8D3

To claim this, I am signing this object:

var fs = require('fs');
var lineReader = require('readline').createInterface({
input: fs.createReadStream('input.txt')
});
lineReader.on('line', function (line) {
var words = line.split(' ');
var company = [...words].slice(4,words.length).join(' ');
var newLine = `${words[0]};${words[1]};${words[2]};${words[3]};${company}\n`;
fs.appendFile('output.txt', newLine, function (err) {
@joargp
joargp / dabblet.css
Last active August 3, 2017 13:44
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container { background: lightgray; max-width: 400px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;}
.spinner {
display: flex;
min-height: 60px;
padding: 10px;
background: pink;
justify-content: center;
@joargp
joargp / dabblet.css
Last active August 3, 2017 13:45
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container { background: lightgray; max-width: 400px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between;}
.spinner {
display: flex;
min-height: 60px;
padding: 10px;
justify-content: center;