Skip to content

Instantly share code, notes, and snippets.

Nyah ch3ck

Block or report user

Report or block ch3ck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ch3ck
ch3ck / active-issues.sql
Created Nov 13, 2019 — forked from alysonla/active-issues.sql
Queries that power the open source section of the 2016 Octoverse report https://octoverse.github.com/
View active-issues.sql
-- Active issues
-- Count of total active issues in the specified time frame
-- Source: githubarchive public data set via Google BigQuery http://githubarchive.org/
SELECT
COUNT(DISTINCT JSON_EXTRACT_SCALAR(events.payload, '$.issue.id')) AS events_issue_count
FROM (SELECT * FROM TABLE_DATE_RANGE([githubarchive:day.],TIMESTAMP('2015-09-01'),TIMESTAMP('2016-08-31')))
AS events
-- 10,723,492 active issues
View keybase proof
### Keybase proof
I hereby claim:
* I am ch3ck on github.
* I am nyahcheck (https://keybase.io/nyahcheck) on keybase.
* I have a public key ASBfwbymiOQwcrZfaZ8_amDoSPtOE8NKYNi7itxFSSBJIQo
To claim this, I am signing this object:
@ch3ck
ch3ck / LogShipToCloudWatch.js
Created Sep 10, 2018 — forked from adamjarret/LogShipToCloudWatch.js
AWS Lambda for shipping logs from S3 to CloudWatch
View LogShipToCloudWatch.js
const aws = require('aws-sdk');
const s3 = new aws.S3({apiVersion: '2006-03-01'});
const cw = new aws.CloudWatchLogs({apiVersion: '2015-01-28'});
const AlreadyExists = 'ResourceAlreadyExistsException';
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
// Thanks https://github.com/caolan/async/blob/master/lib/waterfall.js
function cascade(tasks, callback, ignoreError)
@ch3ck
ch3ck / react-cognito-auth-js.js
Created Sep 7, 2018 — forked from gabeweaver/react-cognito-auth-js.js
React + Cognito User Pools + Cognito Identity JS Example
View react-cognito-auth-js.js
/*
This example was built using standard create-react-app out of the box with no modifications or ejections
to the underlying scripts.
In this example, i'm using Google as a social provider configured within the Cognito User Pool.
Each step also represents a file, so you can see how I've chosen to organize stuff...you can do it however
you'd like so long as you follow the basic flow (which may or may not be the official way....but its what I found that works.
The docs are pretty horrible)
@ch3ck
ch3ck / System Design.md
Created Jul 12, 2018 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ch3ck
ch3ck / System Design.md
Created Jul 12, 2018 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@ch3ck
ch3ck / ES Insert and Update Query
Last active Jun 27, 2018
The following ES queries have been tested verified they work by providing sample responses from the API
View ES Insert and Update Query
## ES Queries
# Instructions
You can run these queries as they are from within the sandbox VM
else replace the `http://127.0.0.1` with `http://sandbox.dilmil.co`
# Get list of indexes on ES:
curl -XGET http://127.0.0.1:9200/_cat/indices?v
```
health status index pri rep docs.count docs.deleted store.size pri.store.size
View gist:7ba36b2cc06d001199a96afdc4d90932
### Keybase proof
I hereby claim:
* I am ch3ck on github.
* I am ch3ck (https://keybase.io/ch3ck) on keybase.
* I have a public key ASCeG9G-poqKA9p21bK8ziTr2YlFsEAhNFZAz8VtuZHqQAo
To claim this, I am signing this object:
View Integrity Error, not null constraint
Exception 'dailyPM' while updating extended keys for user 5
Exception details:
############################################
# Stack Trace ##############################
############################################
Traceback (most recent call last):
File "/mnt/shares/backend/modules/data/repository/profile.py", line 307, in update_sql_profile_extended
self.sql.profile_extended[extended_row.id] = updated_profile_extended
@ch3ck
ch3ck / app_injector error
Created May 30, 2018
I'm having the following issue importing the app_injector package.
View app_injector error
raceback (most recent call last):
File "/mnt/shares/backend/test/data/messenger_bot_model_test.py", line 5, in <module>
from app_injector import injector
File "/mnt/shares/backend/app_injector.py", line 3, in <module>
from modules.api.api_module import ApiModule
File "/mnt/shares/backend/modules/api/api_module.py", line 5, in <module>
from modules.api.functions import *
File "/mnt/shares/backend/modules/api/functions/alive.py", line 9, in <module>
from .. import response
File "/mnt/shares/backend/modules/api/response.py", line 4, in <module>
You can’t perform that action at this time.