Skip to content

Instantly share code, notes, and snippets.

@huybn5776
huybn5776 / OracleDbContext.cs
Last active June 24, 2018 09:00
Entity Framework 如何指定Select時需使用DbFunction
public class OracleDbContext : DbContext
{
public string ConnectionString { get; set; }
public OracleDbContext(string connectionString) => ConnectionString = connectionString;
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
var logger = new LoggerFactory();
logger.AddConsole();
logger.AddDebug();
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active September 11, 2025 15:46
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@sebble
sebble / stars.sh
Last active January 26, 2026 05:13
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@vidaaudrey
vidaaudrey / ie67891011-css-hacks.txt
Created June 19, 2016 20:52 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
@pa4373
pa4373 / bcc.py
Last active October 19, 2019 15:50
不用開hichannel網頁也能聽中廣流行網
#!/usr/bin/env python
import time
import base64
import hashlib
import urllib
import urlparse
import urllib2
import subprocess
from collections import OrderedDict
@plaurin
plaurin / SelfCompile
Created October 7, 2012 21:00
Self Compiling LinqPad query
void Main()
{
Environment.CurrentDirectory = Path.GetDirectoryName(Util.CurrentQueryPath);
Compiler.CompileFiles(Options.CreateOnDiskDll(
@namespace: "LinqPad.QueriesCompiler",
outputFile: "LinqPad.QueriesCompiler.dll")
.AddCodeFile(CodeType.LinqProgramTypes, Util.CurrentQueryPath))
.Dump("Successfully created assembly at " + DateTime.Now.ToLocalTime());
}