View main.go
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"strings" | |
"gopkg.in/mgo.v2/bson" | |
) |
View main.go
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
fmt.Print(hideEmailAddress("emailAddress@gmail.com")) |
View form-validation.jsx
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import { EMLINK } from 'constants'; | |
export default class FormValidation extends Component { | |
static propTypes = { | |
children: PropTypes.node, | |
submit: PropTypes.func.isRequired | |
}; |
View server.js
const express = require('express'); | |
const axios = require('axios'); | |
const cacheAdapter = require('axios-cache-adapter'); | |
const app = express() | |
const port = 3210 | |
const fetchCache = cacheAdapter.setup({ | |
cache: { | |
maxAge: 15 * 60 * 1000 | |
} |
View index.html
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Fanap Drive Upload</title> | |
</head> | |
<body> |
View data.js
{ | |
"hasError": false, | |
"referenceNumber": "207899", | |
"errorCode": 0, | |
"count": 0, | |
"ott": "ad341b80f845cd2e", | |
"result": { | |
"id": 132, | |
"hash": "M9XRVIRGBQEQW5BW", | |
"ownerId": 0, |
View gist:542efea7984bbcb3ccc2315f1d36f46e
DirectoryIndex /application/index.html | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule . /application/index.html [L] | |
<IfModule mod_expires.c> | |
ExpiresActive Off | |
</IfModule> |
View gist:58460372cf2e4c54fc7679a614b114cb
iptables -A INPUT -m geoip --src-cc A1 -j DROP && | |
iptables -A INPUT -m geoip --src-cc A2 -j DROP && | |
iptables -A INPUT -m geoip --src-cc AD -j DROP && | |
iptables -A INPUT -m geoip --src-cc AE -j DROP && | |
iptables -A INPUT -m geoip --src-cc AF -j DROP && | |
iptables -A INPUT -m geoip --src-cc AG -j DROP && | |
iptables -A INPUT -m geoip --src-cc AI -j DROP && | |
iptables -A INPUT -m geoip --src-cc AL -j DROP && | |
iptables -A INPUT -m geoip --src-cc AM -j DROP && | |
iptables -A INPUT -m geoip --src-cc AO -j DROP && |
View preview-form.jsx
import m from "mithril"; | |
module.exports = (options, ...elements) => { | |
return ( | |
<form {...options.attrs} class="form needs-validation"> | |
{ | |
elements.map(e => { |
View preview-pagination.jsx
import m from "mithril"; | |
export default { | |
go(number) { | |
this.node.state[this.state] = number; | |
this.redraw(); | |
}, | |
eachPage(number, active = false) { |
NewerOlder