Skip to content

Instantly share code, notes, and snippets.

🚀
Building cool stuff

Aswin M Prabhu aswinmprabhu

🚀
Building cool stuff
Block or report user

Report or block aswinmprabhu

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
View GSoC-Final-Submission.md

Google Summer of Code Final Submission

Student - Aswin M Prabhu

Organization - Moira

Project - Adding support for additional delivery channels to Moira

Proposal - https://docs.google.com/document/d/1dJ-9BFo998RSrNWIlA0GViKDiBlBi05UcaALEyggWPI/edit?usp=sharing

Project on GSoC website - https://summerofcode.withgoogle.com/projects/#5444359158235136

The initial aim of the project as stated in my proposal was to add support for additional delivery channels to Moira. Moira is a real-time alerting tool, based on Graphite data. Delivery channels are integrations with other services such as Slack or email used to alert users. The proposed channels included popular on-call incident management tools like PagerDuty, VictorOps, Opsgenie, team chat apps like Discord and voice and SMS API providers like Nexmo. During these 3

View decoderecursive.cpp
#include <bits/stdc++.h>
using namespace std;
string nstr;
string decode(string str, int *i)
{
string retval;
while (*i < str.length() && str[*i] != ']')
{
if (!isdigit(str[*i]))
View decodestring.cpp
#include <bits/stdc++.h>
using namespace std;
string decode(string str)
{
stack<int> numstack;
stack<char> charstack;
string nstr;
for (int i = 0; str[i] != '\0'; i++)
{
View firebase-react-hooks.js
function App() {
const [nickname, setNickname] = useState("");
const [email, setEmail] = useState("");
const [joined, setJoined] = useState(false);
const [msg, setMsg] = useState("");
const [messages, setMessages] = useState({});
const chatRoom = db.ref().child('chatrooms').child('global');
useEffect(() => {
@aswinmprabhu
aswinmprabhu / firebase-react-class.js
Last active May 8, 2019
Firebase real-time chatroom app using react class based components
View firebase-react-class.js
class App extends Component {
constructor() {
super();
this.state = {
joined: false,
nickname: "",
email: "",
msg: "",
messages: {},
};
View rackspaceauthtest.go
package main
import (
"fmt"
"github.com/cloudlibz/gocloud/rackspaceauth"
)
func main() {
rackspaceauth.LoadConfigAndAuthenticate()
View merge-schemas.js
import { mergeSchemas } from 'graphql-tools';
const makeMergedSchema = async () => {
const userSchema = await createRemoteExecutableSchema();
const customResolver = makeCustomResolver(userSchema);
// merge the two schemas
const mergedSchema = mergeSchemas({
schemas: [userSchema],
View create-custom-resolver.js
const makeCustomResolver = (userSchema) => {
// Create custom resolvers
const customResolver = {
Mutation: {
insert_user(parent, args, context, info){
let newArgs = { objects:[] };
// Convert the email to lower case and append each object to the new arguments array
for (const user of args.objects) {
user.email = user.email.toLowerCase();
newArgs.objects.push(user);
View create-remote-schemas.js
import {
makeRemoteExecutableSchema,
introspectSchema,
} from 'graphql-tools';
import fetch from 'node-fetch';
import { HttpLink } from 'apollo-link-http';
// To satisfy Extend peer dependencies
import 'apollo-link';
const createRemoteExecutableSchema = async () => {
You can’t perform that action at this time.