Skip to content

Instantly share code, notes, and snippets.

View ericlewis's full-sized avatar

Eric Lewis ericlewis

View GitHub Profile
@ericlewis
ericlewis / Using mongoDB FTS in Node.js
Created March 4, 2013 22:45
Hacky way of using mongoDB 2.4RC1's FTS (full text search) in Mongoose w/ node.js
Model_to_use.db.db.executeDbCommand({text: "collection_name", search: "term_to_search"}, function(err,response){ ... });
@ericlewis
ericlewis / generate-rncore.js
Created March 7, 2019 18:38
Generates the files needed for React Native Fabric components.
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
@ericlewis
ericlewis / Thing.m
Created April 13, 2019 17:33
react-native NativeModule for interacting with gmail objc google rest apis
//
// RNGmailAPI.m
// astroboy
//
// Created by Eric Lewis on 4/9/19.
// Copyright © 2019 Eric Lewis. All rights reserved.
//
#import "RNGmailAPI.h"
#import "RNPromiseWrapper.h"
@ericlewis
ericlewis / RCTNativeTestModuleSpec.h
Last active November 19, 2019 07:27
Codegen experiment
/**
* RCTNativeTestModuleSpec.h
*
* NOTE: This file is codegenerated.
*/
#import <vector>
#import <Foundation/Foundation.h>
@ericlewis
ericlewis / auto-remove-gtk.js
Created May 23, 2019 19:19
usage: `node auto-remove-gtk.js pm2-notrack`
const assert = require('assert');
assert(process.argv.length > 2, 'Must include a package name');
const newName = process.argv[2];
const util = require('util');
const fs = require('fs');
const exec = util.promisify(require('child_process').exec);
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
@ericlewis
ericlewis / auto-remove-gtk.js
Created May 23, 2019 19:19
usage: `node auto-remove-gtk.js pm2-notrack`. the arg is the name of the package you want to publish.
const assert = require('assert');
assert(process.argv.length > 2, 'Must include a package name');
const newName = process.argv[2];
const util = require('util');
const fs = require('fs');
const exec = util.promisify(require('child_process').exec);
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
platform :ios, '12.0'
require_relative '../node_modules/react-native/scripts/autolink-ios'
def common_pods
use_react_native!
end
target 'proj' do
common_pods
import React, { useEffect, useRef } from "react";
import {
Animated,
Dimensions,
Image,
StyleSheet,
Text,
TouchableOpacity,
} from "react-native";
import Config from "react-native-config";
//
// CircularProgress.swift
// Time!
//
// Created by Eric Lewis on 6/9/19.
// Copyright © 2019 Eric Lewis, Inc. All rights reserved.
//
import SwiftUI