Skip to content

Instantly share code, notes, and snippets.

@kyle-ssg
kyle-ssg / gist:be6c93273aa4304331713be240ab8225
Created February 16, 2018 10:30
Node Twitter List Follower
const admin = require("firebase-admin");
const Twit = require('twit')
const serviceAccount = require("./firebase-service-account.json");
const config = require('../config').twitter;
const T = new Twit(config)
const _ = require('lodash');
const SIMULATE = false;
console.log(JSON.stringify(config, null, 2))
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),

secured-async-storage

Set salt

When

1: when the user logs in

2: When the user changes their secret word

```secured-async-storage```
# Set salt
**When**
1: when the user logs in
2: When the user changes their secret word
Set salt
- When
1: when the user logs in
2: When the user changes their secret word
- Process
This is the process whereby combination of the secret word and salt along with a generated challenge is stored for later use.
Generate secret challenge
- When
Set salt
- When
1: when the user logs in
2: When the user changes their secret word
- Process
This is the process of storeing the encrypted secret answer along with a salt.
At this point the previous secured local storage is wiped, storeing a combination of the secret word and salt along with a generated challenge.
If there is local storage data in memory at this point it is re-encrypted using the generated challenge and written to local storage.

Contributing

We're always looking to improve this project, open source contribution is encouraged so long as they adhere to our guidelines.

Pull Requests

The Solid State team will be monitoring for pull requests. When we get one, a member of team will test the work against our internal uses and sign off on the changes. From here, we'll either merge the pull request or provide feedback suggesting the next steps.

A couple things to keep in mind:

  • If you've changed APIs, update the documentation.
@kyle-ssg
kyle-ssg / Animation
Created February 20, 2017 10:17
animates opacity on press
const Animation = class extends Component {
displayName: 'Animation'
constructor (props, context) {
super(props, context);
this.state = { opacity: 1 };
}
toggleFade = () => {
//toggle opacity
@kyle-ssg
kyle-ssg / loadMore
Created November 27, 2016 11:37
Firebase paging
var loadMore = (ref, from, qty, reverse=false)=> {
var direction = reverse ? 'endAt' : 'startAt';
return ref['direction'](null,from)
.limitToFirst(qty+1)
.once('value')
.then((snap)=>{
var items = snap.val() || {};
var res = {hasMore:false, items};
delete items[from];
res.hasMore = Object.keys(items).length == qty;

0. Firebase

This application requires you to have firebase setup, from there you specify at what location you want to store chat

    import FireChat from '../fire-chat';
    const chat = new Firechat(db.ref("chat"));

1. Register events

***0. Firebase***
This application requires you to have firebase setup, from there you specify at what location you want to store chat
```
import FireChat from '../fire-chat';
const chat = new Firechat(db.ref("chat"));
```
***1. Register events***