Skip to content

Instantly share code, notes, and snippets.

View alexleventer's full-sized avatar
💭

Alex Leventer alexleventer

💭
View GitHub Profile
import React from 'react';
import { ApolloClient, createHttpLink, InMemoryCache, gql } from '@apollo/client';
import { setContext } from '@apollo/client/link/context';
import { ApolloProvider, useQuery } from '@apollo/react-hooks';
import { generateAstraToken, generateUUId } from './utils';
import './App.css';
import { DB_ID, DB_REGION, HASURA_DB_ID, HASURA_TOKEN } from './constants';
const CHARACTERS = gql`
{
EMPLOYEE = {
NAME, EMPID, DEPTNAME
Harry, 3415, Finance
Sally, 2241, Sales
George, 3401, Finance
Harriet, 2202, Production
}
DEPT = { DEPTNAME MANAGER
Sales Harriet
Production Charles
server {
listen 80;
return 301 https://$host$request_uri;
}
# HTTPS server
#
server {
listen 443 ssl;
server_name jenkins.tred.com;
public class LinkedListQueue<E> {
private class Node {
Node next;
E data;
public Node(E data, Node next) {
this.data = data;
this.next = next;
}
}
public class ArrayStack {
private int[] s;
private int top;
public ArrayStack(int capacity) {
s = new int[capacity];
top = 0;
}
public boolean empty() {
import java.util.*;
class ArrayQueue {
private String[] q;
private int front;
private int rear;
private int size;
ArrayQueue(int capacity) {
front = 0;
package cpsc5002_02;
public class LinkedListPlay {
private static class Node {
public double payload;
public Node next;
public Node(double payload, Node next) {
this.payload = payload;
public class BinarySearch
{
public static int binarySearch(int[] a, int target)
{
int left = 0, right = a.length -1;
while (left <= right)
{
int mid = (left + right) / 2;
if(a[mid] == target)
return mid;
public class PracticeFinal
{
public static void printMultiplicationTable(int num)
{
// Print header
System.out.printf("%2s, "");
for (int i = 1; i <= num; i++)
{
System.out.printf("%2d", i);
}
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Fri Jan 20 04:52:18.209726 2017] [:error] [pid 24842] [remote 52.23.194.19:336] werkzeug.exceptions.ClientDisconnected: 400: Bad Request
[Fri Jan 20 04:52:18.210044 2017] [:error] [pid 24842] [remote 52.23.194.19:2374] mod_wsgi (pid=24842): Exception occurred processing WSGI script '/opt/python/current/app/application.py'.
[Fri Jan 20 04:52:18.210108 2017] [:error] [pid 24842] [remote 52.23.194.19:2374] Traceback (most recent call last):
[Fri Jan 20 04:52:18.210182 2017] [:error] [pid 24842] [remote 52.23.194.19:2374] File "/opt/python/run/venv/lib/python3.4/site-packages/werkzeug/wsgi.py", line 1038, in read
[Fri Jan 20 04:52:18.210197 2017] [:error] [pid 24842] [remote 52.23.194.19:2374] read = self._read(to_read)
[Fri Jan 20 04:52:18.210235 2017] [:error] [pid 24842] [remote 52.23.194.19:2374] OSError: request data read error
[Fri Jan 20 04:52:18.210263 2017] [:error] [pid 24842] [remote 52.23.194.19