Skip to content

Instantly share code, notes, and snippets.

@anonrig
anonrig / gist:f8865ee3066404f0f762
Last active August 29, 2015 14:27
Cordova config.xml for Android and iOS icons
<platform name="android">
<icon src="www/img/Android/icon_ldpi.png" density="ldpi" />
<icon src="www/img/Android/icon_mdpi.png" density="mdpi" />
<icon src="www/img/Android/icon_hdpi.png" density="hdpi" />
<icon src="www/img/Android/icon_xhdpi.png" density="xhdpi" />
<icon src="www/img/Android/icon_xxhdpi.png" density="xxhdpi" />
<icon src="www/img/Android/icon_xxxhdpi.png" density="xxxhdpi" />
</platform>
<platform name="ios">
@anonrig
anonrig / inapppurchase-cordova.md
Last active December 23, 2022 07:44
Problems with inAppPurchase cordova plugin

Note: I've inspired from inAppPurchase Cordova Plugin's test example code. This is my service file for Ionic Framework with In App Purchase plugin for Cordova:

(function() {
    angular.module('trackFollowersApp').service('inAppPurchase', function($resource) {
        var IAP = {
            initialize: function() {
                if (!window.storekit) {
                    console.log('In-App Purchases not available');
Computer Information:
Manufacturer: Apple
Model: MacPro6,1
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
CPU Family: 0x6
@anonrig
anonrig / router.js
Created February 11, 2019 21:11
node.js aes example
const PromiseRouter = require('express-router-wrapper')
const router = new PromiseRouter()
const crypto = require('crypto')
const iv = process.env.VPN_AES_IV
const secret = process.env.VPN_AES_SECRET
router
.get('/', async (req, res) => {
const text = {key: "value"}
@anonrig
anonrig / subscription.sql
Last active January 23, 2020 14:34
subscription
SELECT
"SubscriberID",
"StandardSubscriptionDuration" as "SubscriptionDuration",
MIN("EventDate") as "FirstTransaction",
MAX("EventDate") as "LastTransaction",
"ApplicationId",
CASE
WHEN MAX("EventDate") BETWEEN LOCALTIMESTAMP - ("StandardSubscriptionDuration")::interval AND LOCALTIMESTAMP THEN true ELSE false
END AS "isActive"
FROM "Subscriptions"
@anonrig
anonrig / relevant-fruit-cla.md
Created March 16, 2020 00:57
Relevant Fruit CLA

Relevant Fruit Individual Contributor License Agreement ("Agreement")

In order to clarify the intellectual property license granted with Contributions from any person or entity, Relevant Fruit must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Relevant Fruit and its users; it does not change your rights to use your own Contributions for any other purpose.

@anonrig
anonrig / md
Created June 5, 2021 08:42
keybase.md
### Keybase proof
I hereby claim:
* I am yagiznizipli on github.
* I am yagiznizipli (https://keybase.io/yagiznizipli) on keybase.
* I have a public key ASA2rgyCL4gEB4CdjEqKG9MpqtuOaDslQAYzaSoOCgUfPgo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am anonrig on github.
  • I am yagiznizipli (https://keybase.io/yagiznizipli) on keybase.
  • I have a public key ASAt2wISFMW53E4DHdkOFb82GbSDMerW9CMhUYq1SSos2wo

To claim this, I am signing this object:

@anonrig
anonrig / get-review-threads.js
Created February 17, 2022 18:56
Get Review Threads using Github
import { graphql } from '@octokit/graphql'
/**
* @function getReviewThreads
* @param {{
* authorization: string,
* repository: {slug: string},
* organization: {slug: string},
* pull_request: {number: number}
* }} filters
@anonrig
anonrig / async-iterator.js
Created October 26, 2022 15:22
Async-iterator
const Stream = require('stream');
const { EventEmitter } = require('events');
const controller = new AbortController();
class Custom extends EventEmitter {
[Symbol.asyncIterator]() {
const stream = new Stream.Readable({
destroy(_error, callback) {