Skip to content

Instantly share code, notes, and snippets.

View ken0x0a's full-sized avatar
💣

Ken ken0x0a

💣
View GitHub Profile
@hos
hos / locale.plugin.js
Last active March 3, 2021 17:44
Postgraphile plugin to use table_name_locale to map translated data on original. NOTE this won't work for order by, filter or similar quries.
export default function LocalePlugin (builder) {
builder.hook('GraphQLObjectType:fields:field', (field, build, ctx) => {
const { pgSql: sql, inflection, options } = build
const {
scope: { pgFieldIntrospection },
addDataGenerator
} = ctx
if (
{
"title": "JSONPgSmartTags",
"type": "object",
"properties": {
"version": {
"type": "number",
"minimum": 1
},
"config": {
"type": "object",
@deepakshrma
deepakshrma / Dockerfile
Last active December 8, 2019 21:00
Dockerfile
FROM gradle:latest
# FROM openjdk:8-jre-alpine
USER root
# RUN apk --no-cache add curl
ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" \
ANDROID_HOME="/usr/local/android-sdk" \
ANDROID_VERSION=28 \
ANDROID_BUILD_TOOLS_VERSION=29.0.2
# Download Android SDK
RUN mkdir "$ANDROID_HOME" .android \
@scriptingosx
scriptingosx / pkgAndNotarize.sh
Created September 10, 2019 12:46
Script that builds, packages and notarizes an Xcode command line tool.
#!/bin/zsh
# pkgAndNotarize.sh
# 2019 - Armin Briegel - Scripting OS X
# place a copy of this script in in the project folder
# when run it will build for installation,
# create a pkg from the product,
# upload the pkg for notarization and monitor the notarization status
@voluntas
voluntas / open_komugi.rst
Last active September 10, 2023 09:41
OpenKomugi プロジェクト
@amanshuraikwar
amanshuraikwar / adbwificonnect.sh
Last active January 11, 2022 10:22
Shell script to connect a USB connected device via adb over WiFi
# Purpose: Shell script to connect a USB connected device via adb over WiFi
#
# Author: Amanshu Raikwar
#
# Assumptions:
# 1. USB debugging is enabled in the Android device
# 2. The Android device is connected to the computer via USB
# 3. The Android device is connected to the same wifi as the computer
# 4. The Android device is accessible through port 5555 over the wifi network
#
@frankdugan3
frankdugan3 / audit-graphql-schema.js
Last active April 9, 2019 09:03
Script to audit a GraphQL schema against previous commit.
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
module.exports = function PgUpsertPlugin(
builder,
{ pgDisableDefaultMutations }
) {
if (pgDisableDefaultMutations) {
return;
}
builder.hook("inflection", (inflection, build) =>
build.extend(inflection, {
@mikaelvesavuori
mikaelvesavuori / localhost-certificate.sh
Created February 27, 2019 08:34
HTTPS Certificate for Localhost
# From: https://letsencrypt.org/docs/certificates-for-localhost/
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
@flyingdogz
flyingdogz / fb-deletion-callback-example.py
Last active April 21, 2021 12:16
Example implementation of Facebook Data Deletion Callback in Python
import base64
import hashlib
import hmac
import json
from flask import Flask, jsonify, request
app = Flask(__name__)