Skip to content

Instantly share code, notes, and snippets.

View wwerner's full-sized avatar

Wolfgang Werner wwerner

View GitHub Profile

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@wwerner
wwerner / embed gist.md
Created April 14, 2021 07:40 — forked from Albert-W/embed gist.md
embed gist in iframe

Embed gist in iframe

it is used to embed gist to an asynchronously-loaded web pages.

<iframe 
    width="100%"
    height="350"    
    src="data:text/html;charset=utf-8,
 
@wwerner
wwerner / restore-heroku-db-dump.locally.txt
Last active June 20, 2018 10:35 — forked from kagemusha/gist:1569836
Dump Heroku Postgres DB and load locally into postgres
Get the Heroku db as detailed here:
http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup
$ heroku pg:backups:capture # outputs backup_num in the last line
$ heroku pg:backups:url <backup_num> #=> backup_url
$ curl -o /tmp/latest.dump <backup_url>
Then locally do:
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb /tmp/latest.dump