Skip to content

Instantly share code, notes, and snippets.

View Necmttn's full-sized avatar
🖖
Maker

Neco Necmttn

🖖
Maker
View GitHub Profile
@Necmttn
Necmttn / 0_reuse_code.js
Created March 10, 2017 05:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Necmttn
Necmttn / download-file.js
Last active June 12, 2017 09:00
Instagram download picture.
var fs = require("fs")
var request = require("request")
module.exports = function(url, dest, cb) {
var file = fs.createWriteStream(dest)
var sendReq = request.get(url)
// verify response code
sendReq.on("response", function(response) {
if (response.statusCode !== 200) {
@Necmttn
Necmttn / refues recruters.
Created July 14, 2017 06:12
auto refuse.
[...document.querySelectorAll('.invite-card')].forEach(card => {
const headline = card.querySelector('.headline').textContent;
const accept = card.querySelector('.bt-invite-accept');
const decline = card.querySelector('.bt-invite-decline');
const name = card.querySelector('.name').textContent;
if(headline.match(/recruit/gi)) {
console.log(`Nah. ${name} looks a little fishy to me. 🚷🚷🚷`);
decline.click();
} else {
import gym
from gym import wrappers
logPath = '/tmp/cartpole-experiment-1'
apiKey = 'sk_Cw5T7JD1RY2u6Gn4DVTjw'
env = gym.make('CartPole-v0')
env = wrappers.Monitor(env, logPath)
for i_episode in range(20):
observation = env.reset()
for t in range(100):
@Necmttn
Necmttn / Nature.ipynb
Created September 16, 2017 11:38 — forked from zonca/Nature.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Necmttn
Necmttn / test.md
Created September 16, 2017 12:31
trying out

hello

TODO:

*[ ] Setup folder structure.

WORKING:

TODO:

  • Start empty project.
  • Setup folder structure.
  • Add Required Plugins.

WORKING:

@Necmttn
Necmttn / todo.md
Last active October 6, 2017 10:21

TODO:

  • Start empty project.
  • Setup folder structure.
  • Add Required Plugins.

WORKING:

import React from 'react'
const Blog = (props) => {
const posts = props.data.allMarkdownRemark.edges
return (
<div>
<h1> blog pages </h1>
<ul>
{posts.map(post => {