Skip to content

Instantly share code, notes, and snippets.

View DarkSector's full-sized avatar
🏗️
Building stuff

Pronoy Chopra DarkSector

🏗️
Building stuff
View GitHub Profile
@DarkSector
DarkSector / capability.js
Created April 10, 2019 18:26
_this.props.loadConfig is not a function
import React from 'react'
import { connect } from 'react-redux'
import { Button, Card } from 'antd'
import { executeCapability, loadConfig } from '../ducks/nodes'
class Capability extends React.Component {
constructor (props) {
super(props)
this.renderContent = this.renderContent.bind(this)
@DarkSector
DarkSector / The Technical Interview Cheat Sheet.md
Created March 20, 2018 19:06 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@DarkSector
DarkSector / celery.sh
Created July 23, 2017 08:04 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@DarkSector
DarkSector / massflash.py
Created July 21, 2017 07:04 — forked from geekman/massflash.py
automated ESP8266 programming station to mass flash large quantity of devices quickly
#!/usr/bin/env python
#
# automated ESP8266 programming station
# monitors for inserted serial devices and calls esptool to flash them
# written to mass flash entire batches of ESP8266 devices quickly
# $ pip install esptool pyudev
#
# 2016.06.16 darell tan
#
@DarkSector
DarkSector / middleware.py
Created June 29, 2017 08:28 — forked from antonagestam/middleware.py
JSONRequestMiddleware
import json
from .utils import copy_body
class JSONRequest(dict):
def __init__(self, request):
try:
data = json.loads(copy_body(request))
self.is_valid = True
@DarkSector
DarkSector / sprite_test.py
Created August 28, 2016 00:29
sprite test cocos2d python
import cocos
import pyglet
HEIGHT = 600
WIDTH = 800
DEBUG_FONT_SIZE = 11
class SpriteTest(cocos.layer.ColorLayer):
text_color = (0, 0, 0, 255)
@DarkSector
DarkSector / fuckoffnosleep.js
Created October 12, 2015 14:39
Fuck off no sleep
==UserScript==
// @name Fuck off nosleep
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match http*://*.reddit.com/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js
// ==/UserScript==
@DarkSector
DarkSector / __init__.py
Created August 20, 2015 19:31
Init for the distributed settings
# for our settings module
import os
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
from base import * # required because that is what we will override
# now first import local and then dev and then prod
if os.path.isfile(os.path.join(ROOT_DIR, 'settings/local.py')):
from local import *
if os.path.isfile(os.path.join(ROOT_DIR, 'settings/dev.py')):
body {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-size: 15px;
line-height: 22px;
margin: 0;
padding: 0; }
p, h1, h2, h3, h4, h5, h6 {
margin: 0 0 15px 0; }
@DarkSector
DarkSector / jqueryinconsole.js
Created August 20, 2015 04:33 — forked from zxcvbnm4709/gist:2656197
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);