Skip to content

Instantly share code, notes, and snippets.

View erikaheidi's full-sized avatar
🌟
busy creating

Erika Heidi erikaheidi

🌟
busy creating
View GitHub Profile
@imjasonh
imjasonh / demo.md
Last active May 17, 2023 13:36
cgr.dev Tag History API

Demoing cgr.dev tag history

We're going to use the new tag history API to see tag updates to cgr.dev/chainguard/static:latest!

First, exchange your Chainguard token for a registry token. This assumes you've set up auth with chainctl auth configure-docker:

tok=$(curl -H "Authorization: Bearer $(echo 'cgr.dev' | docker-credential-cgr get)" -v "https://cgr.dev/token?scope=repository:chainguard/static:pull" | jq -r .token)
@ChadSikorra
ChadSikorra / DataTable.php
Created October 15, 2012 03:26
Symfony2 Doctrine DataTables.js (Related Entity Enabled)
<?php
/**
* Recognizes mData sent from DataTables where dotted notations represent a related
* entity. For example, defining the following in DataTables...
*
* "aoColumns": [
* { "mData": "id" },
* { "mData": "description" },
* { "mData": "customer.first_name" },
* { "mData": "customer.last_name" }
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.