//npm modules
const express = require('express');
const uuid = require('uuid/v4')
const session = require('express-session')
const FileStore = require('session-file-store')(session);
const bodyParser = require('body-parser');
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const axios = require('axios');
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let days = [ | |
{ s: 'Sun', l: 'Sunday' }, | |
{ s: 'Mon', l: "Monday" }, | |
{ s: 'Tue', l: 'Tuesday' }, | |
{ s: 'Wed', l: 'Wednesday' }, | |
{ s: 'Thu', l: 'Thursday' }, | |
{ s: 'Fri', l: 'Friday' }, | |
{ s: 'Sat', l: 'Saturday' } | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import FormBuilder from './FormBuilder.svelte' | |
import { Form } from './Form' | |
let form = new Form({id: "Test Form", sections: []}) | |
let title ="New Section" | |
function addSection(){ | |
form= form.addSection({title: title, rows:[]}); | |
form.print() | |
} |
Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="PHP_CodeSniffer"> | |
<description>PHPCS configuration file.</description> | |
<!-- check all files in the app directory, feel free to add more files with: | |
<file>FOLDER NAME</file> | |
--> | |
<file>app</file> | |
<file>bootstrap</file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RavenDB { | |
var $server; | |
var $database; | |
var $pem; | |
function __construct($server, $database, $pem = NULL) { | |
$this->server = $server; | |
$this->database = $database; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<style> | |
input[type="date"]::-webkit-inner-spin-button { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Option 1 | |
set -U fish_user_paths /usr/local/bin $fish_user_paths | |
#option 2 | |
set PATH $PATH /usr/local/bin | |
export PATH | |
function ll | |
ls -lh $argv | |
end |
Source: andrej 2021-02-26 13:38:56
- Have a directory for the user for shell scripts:
mkdir ~/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Created by teocci. | |
# | |
# @author teocci@yandex.com on 2017-Nov-14 | |
# | |
# Test an IP address for validity: | |
# Usage: | |
# valid_ip IP_ADDRESS |
OlderNewer