Skip to content

Instantly share code, notes, and snippets.

View foxted's full-sized avatar
🦊

Valentin Prugnaud foxted

🦊
View GitHub Profile
@foxted
foxted / maintenance-status-badges.md
Created June 13, 2023 23:43 — forked from taiki-e/maintenance-status-badges.md
Markdown Maintenance status badges
async subscribe() {
this.error = false;
if(!this.isLoggedIn || !this.user) {
return ;
}
const onCallCreateNotificationToken = httpsCallable(this.$functions, ON_CALL_CREATE_NOTIFICATION_TOKEN);
const { data } = await onCallCreateNotificationToken();
@foxted
foxted / activity.json
Created February 7, 2022 01:02
stream issue
{
"actor": "provider:1",
"verb": "reschedule",
"object": "appointment:836",
"foreign_id": "appointment:836",
"target": "appointment",
"to": [
"notifications:w1hqxJPthp4WKwMO2QaKY7IfJSbH",
"notifications:1Hs1fmSSNqGgQDdGBdnrzV6N528N"
],
@foxted
foxted / apollo-config.js
Created January 19, 2022 07:41 — forked from KazW/apollo-config.js
Hasura, Nuxt (Vue), Nuxt Auth, Auth0 and Apollo
import { SubscriptionClient } from 'subscriptions-transport-ws'
import { onError } from 'apollo-link-error'
import { setContext } from 'apollo-link-context'
import { split, from } from 'apollo-link'
import { WebSocketLink } from 'apollo-link-ws'
import { getMainDefinition } from 'apollo-utilities'
import { createUploadLink } from 'apollo-upload-client'
import * as ws from 'ws'
export default (context) => {
@foxted
foxted / standard-version.js
Created September 10, 2020 17:10
Update Android and iOS version
const fs = require('fs');
const path = require('path');
const pkg = require('./package');
const convert = require('xml-js');
const beautify = require('xml-beautifier');
const plist = require('plist');
updateIOSPList();
updateAndroidManifest();
@foxted
foxted / difference.js
Created August 8, 2020 23:10 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@foxted
foxted / standard-version.js
Created October 3, 2019 15:33
NativeScript: Update platform-specific manifests
const fs = require('fs');
const path = require('path');
const pkg = require('./package');
const convert = require('xml-js');
const beautify = require('xml-beautifier');
const plist = require('plist');
updateIOSPList();
updateAndroidManifest();

Keybase proof

I hereby claim:

  • I am foxted on github.
  • I am hackval (https://keybase.io/hackval) on keybase.
  • I have a public key ASDYcrMRESGF8s6j68MuX3EhZTvV4vjkOfxUo6g-PG-wIgo

To claim this, I am signing this object:

@foxted
foxted / config.yml
Created June 4, 2018 08:30
Laravel CircleCI config
version: 2
jobs:
build:
docker:
- image: invokedigital/laravel:7.2
environment:
DB_HOST: 127.0.0.1
- image: circleci/mysql:5.7
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda
environment:
@foxted
foxted / default
Created April 19, 2018 10:35
Force https on EC2 behind ALB except Healthchecks
server {
# If traffic is http
if ($http_x_forwarded_proto != 'https') {
set $force_https "A";
}
if ($http_user_agent ~ 'ELB-HealthChecker/2.0') {
set $force_https "${force_https}B";
}