Skip to content

Instantly share code, notes, and snippets.

Avatar

philipstanislaus

View GitHub Profile
View Badger-1588331995333.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@philipstanislaus
philipstanislaus / gist:713bc5468cb944a3f81e6dd5d81de02d
Created Feb 7, 2020
Create empty orphan branch for code review
View gist:713bc5468cb944a3f81e6dd5d81de02d
# Create empty orphan branch for code review
git checkout --orphan code-review
git rm -rf .
git commit --allow-empty -m 'Code review - nuke all'
git push --set-upstream origin code-review
View optional_values_with_empty_field_test.go
package playground_optional_values_with_nil_pointers
import (
"fmt"
"testing"
"github.com/ChainSafe/gossamer/codec"
)
// Bool represents boolean values
View optional_values_with_nil_pointers_test.go
package playground_optional_values_with_nil_pointers
import (
"fmt"
"testing"
"github.com/ChainSafe/gossamer/codec"
)
// Bool represents boolean values
@philipstanislaus
philipstanislaus / Drop all tables.sql
Created Aug 4, 2017
Drop all tables from one schema in Postgres
View Drop all tables.sql
select 'drop table if exists "' || tablename || '" cascade;'
from pg_tables
where schemaname = 'public'; -- or any other schema
@philipstanislaus
philipstanislaus / JavaScript's prototypical inheritance.js
Last active Jun 28, 2017
JavaScript inheritance (prototype, __proto__, constructor) in ES2015/ES6 and ES5
View JavaScript's prototypical inheritance.js
class Animal {
animalProp() {}
}
// ES2015/ES6
class Cat extends Animal {
catProp() {}
}
const myCat = new Cat()
@philipstanislaus
philipstanislaus / cloudSettings
Last active Mar 2, 2017
Visual Studio Code Sync Settings GIST
View cloudSettings
{"lastUpload":"2017-03-02T09:03:15.146Z","extensionVersion":"v2.5.1"}
@philipstanislaus
philipstanislaus / docker stop and remove all containers.sh
Last active Sep 2, 2016
Stop and remove all Docker containers
View docker stop and remove all containers.sh
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
You can’t perform that action at this time.