Skip to content

Instantly share code, notes, and snippets.

@martinheld
martinheld / GraphQL introspection query via curl.md
Last active April 16, 2024 16:26
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@justarandomgeek
justarandomgeek / gist:2c47b4aaee12f717227f867a4c030fae
Last active October 16, 2022 09:49
Factorio Command: Remove all trees in 5000 tile radius
/c
pos = game.player.position
area = {{pos.x - 5000, pos.y - 5000}, {pos.x + 5000, pos.y + 1.5}}
for _, entity in pairs(game.player.surface.find_entities_filtered{area = area, type = "tree"}) do
entity.die()
end
@alimbada
alimbada / Export-Chocolatey.ps1
Last active April 21, 2024 11:39
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@pfmoore
pfmoore / factorio-recipe-parser.lua
Last active September 10, 2021 15:42
Parse the Factorio recipe files to create a CSV of recipes
data = {}
data["extend"] = function (data, t)
for n, recipe in ipairs(t) do
for i, component in ipairs(recipe["ingredients"]) do
cname = component[1] or component["name"]
camt = component[2] or component["amount"]
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt)
end
end
end
@codingfoo
codingfoo / Readme.md
Last active February 12, 2016 03:44
Sensu Widget for Dashing

Description

Simple Dashing job to send sensu client history checks to dashing widgets.

##Dependencies

##Usage

Put the sensu.rb file in your /jobs folder.

@mixonic
mixonic / server.js
Created April 28, 2011 22:49
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//