Skip to content

Instantly share code, notes, and snippets.

View Alynva's full-sized avatar
🤔
Thinking

Alisson Nunes Alynva

🤔
Thinking
View GitHub Profile
@codediodeio
codediodeio / index.js
Created July 17, 2017 17:40
Algolia Firebase Cloud Functions - Update/Delete Items from Index
const functions = require('firebase-functions');
const admin = require("firebase-admin");
admin.initializeApp(functions.config().firebase);
const algoliasearch = require('algoliasearch');
const algolia = algoliasearch(functions.config().algolia.appid, functions.config().algolia.adminkey);
exports.updateIndex = functions.database.ref('/books/{bookId}').onWrite(event => {
@talk2MeGooseman
talk2MeGooseman / index.js
Last active November 16, 2022 15:24
Firebase Cloud Function 3rd Party Oauth Flow For The Web
const functions = require('firebase-functions');
var admin = require("firebase-admin");
const cookieParser = require('cookie-parser');
const crypto = require('crypto');
var serviceAccount = require("./service-account.json");
const APP_NAME = "twitch-playground";
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
@sgreben
sgreben / apk flags.md
Created April 13, 2018 13:09
apk flags

apk

apk-tools 2.8.2, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO] [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version] [-f|--force]
           [--force-binary-stdout] [--force-broken-world] [--force-non-repository] [--force-old-apk] [--force-overwrite] [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD] [--no-progress] [--purge] [--allow-untrusted] [--wait TIME] [--keys-dir KEYSDIR] [--repositories-file REPOFILE]
           [--no-network] [--no-cache] [--cache-dir CACHEDIR] [--arch ARCH] [--print-arch] [ARGS]...
@carry0987
carry0987 / RPi3-Auto-WiFi.md
Last active May 28, 2024 15:21
Raspberry Pi 3B+ Auto reconnect to wifi when lost connect

Auto reconnect to wifi when lost connection

Before you start, make sure ip command is available on your system. In modern Linux distributions, ip replaces older ifconfig command. If net-tools package (that includes ifconfig) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools.

Create script file

Use touch /home/pi/wifi-reconnect.sh to create a shell script file, with the following content:

#!/bin/bash
@at15four2020
at15four2020 / GParsers.gprog.md
Last active September 23, 2022 15:27
GProgrammer parsers

Parsers

This is a list of known packages parsers mainly to be used in G-Earth with the GProgrammer extension, but the code may be useful to understand the package structure and read it anywhere.

Return structure

Every parser may share some caracteritcs:

  • The parser is responsable to read the whole package, from the start to the end;
  • The return type is always an object;
@si458
si458 / build.js
Last active December 28, 2023 10:18
build script for pkg with icon and metainfo
if (process.argv[2] == undefined) process.exit(0);
if (process.argv[2] == "") process.exit(0);
const { pkg_fetch_version, node_version, pkg_cache_path, icon, version, description, company, name, copyright, file } = require(`./${process.argv[2]}.json`);
const ResEdit = require('resedit');
const path = require("path");
const fs = require('fs');
const https = require('https');
function download(url, dest) {
return new Promise((resolve, reject) => {
fs.access(dest, fs.constants.F_OK, (err) => {