Skip to content

Instantly share code, notes, and snippets.

View J3698's full-sized avatar
๐Ÿ›
Inch Worm

Anti J3698

๐Ÿ›
Inch Worm
  • Working
  • Working
View GitHub Profile
@J3698
J3698 / .newvimrc
Last active November 16, 2019 02:27
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
function UrlOutput(props) {
return (
<>
<div className={outputStyles.shortenOutput}>
<div className={outputStyles.siteName}>
urlmem.com/
</div>
<div className={outputStyles.shortWord}>
{props.shortUrl}
</div>
@J3698
J3698 / App.js
Created July 22, 2019 01:00
UrlMem App.js
import React, { Component } from 'react';
import UrlShortening from './UrlShortening.js';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="Header">
<a className="blogButton" href="https://antiprojects.com/urlmem.html">Blog</a>
import React, { Component } from 'react';
import styles from './input-box.module.css';
class UrlInput extends Component {
render() {
return(
<div className={styles.shortenOptions}>
<input type="text" placeholder="url to shorten" className={styles.urlInput} tabIndex="1" />
<button className={styles.shortenButton} tabIndex="3">shorten</button>
<br />
@J3698
J3698 / App.js
Last active June 24, 2019 01:58
import React, { Component } from 'react';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {dataText: "data not yet recieved"};
}
// this is called once the component is rendered at least once
const express = require('express'); // import express
const app = express();
/*
* A deployment service might set a correct PORT
* to use, if no port is set 5000 will probably
* be free for use.
*/
const port = process.env.PORT || 5000;
<!DOCTYPE html>
<html>
<head>
<style>
html {
font-family: Arial;
}
.shorten-options {
position: absolute;
<!DOCTYPE html>
<html>
<head>
<style>
html {
font-family: Arial;
}
.shorten-output {
const fs = require('fs');
const alph = 'abcdefghijklmnopqrstuvwxyz'
try {
var fileContents = fs.readFileSync('./dictionary.txt', 'utf8');
} catch(err) {
throw "Dictionary file does not exist";
}
var words = fileContents.split('\n');
This file has been truncated, but you can view the full file.
A
A's
AMD
AMD's
AOL
AOL's
Aachen
Aachen's
Aaliyah
Aaliyah's