Skip to content

Instantly share code, notes, and snippets.

@dispeakble
dispeakble / sh
Created July 17, 2021 15:40
gist for listing all file lines of code for some file types and exclude directories
find . -name "*.js" -not -path "*node_modules*" | xargs wc -l
find . -name "*.ts" -not -path "*node_modules*" | xargs wc -l
find . -name "*.js" -not -path "*public*" | xargs wc -l
find . -name "*.js" -not -path "*dist*" | xargs wc -l
# and all together
find . -name "*.js" -not -path "*node_modules*" -not -path "./public*" -not -path "./dist*" | xargs wc -l
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple HTML5 page </title>
</head>
<body>
<header>
<hgroup>
@dispeakble
dispeakble / net.js
Created August 17, 2018 09:42
ai net.js
var net = {
objects:{
request:require('request'),
cheerio:require('cheerio')
},
actions:{
search:function(params){
return new Promise(function(resolve_search, reject_search){
var url = 'http://api.pearson.com/v2/dictionaries/entries?headword=' + params.data;
@dispeakble
dispeakble / parser.js
Last active August 17, 2018 09:41
ai parser.js
var parser = {
objects: {
},
api: {
parse: function (params) {
return new Promise(function (resolve_parse) {
var response = {
what:params.data.what,
hash:params.hash
@dispeakble
dispeakble / crud.js
Created August 17, 2018 09:34
ai crud.js
var crud = {
objects: {},
api: {
get: function (params) {
var QUERY_STRING,
QUERY_PARAMS = [],
WHERE_STRING,
WHERE_PIECES = [],
HOW = params.how || 'and',
@dispeakble
dispeakble / go.js
Created August 17, 2018 09:33
ai go.js
var api = {
crud:require('./api/crud'),
parser:require('./api/parser'),
net:require('./api/net'),
db:require('./api/db'),
com:require('./api/com'),
mem:require('./api/mem'),
sys:require('./api/sys')
}
@dispeakble
dispeakble / package.json
Created August 17, 2018 09:32
ai package.json
{
"name": "IO",
"version": "1.0.0",
"description": "IO",
"main": "go",
"scripts": {
"go": "forever go"
},
"dependencies": {
"babylonjs": "^3.2.0",
@dispeakble
dispeakble / ai.sql
Created August 17, 2018 09:19
ai_db
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.3.22
-- Dumped by pg_dump version 9.3.22
-- Started on 2018-07-30 11:16:37
SET statement_timeout = 0;
SET lock_timeout = 0;