This file contains hidden or 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
| // Create Base64 Object | |
| var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r |
This file contains hidden or 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
| { | |
| "Version":"2008-10-17", | |
| "Id":"http referer policy example", | |
| "Statement":[ | |
| { | |
| "Sid":"Allow get requests referred by www.mysite.com and mysite.com", | |
| "Effect":"Allow", | |
| "Principal":"*", | |
| "Action":"s3:GetObject", | |
| "Resource":"arn:aws:s3:::YOUR_S3_BUCKET_NAME/*", |
This file contains hidden or 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
| const request = require('request-promise'); | |
| const errors = require('feathers-errors'); | |
| const options = { | |
| idField: 'sub', | |
| issuer: 'iss' | |
| }; | |
| module.exports = function() { |
This file contains hidden or 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
| import React, {Component} from 'react'; | |
| import {View, Text, Navigator, StatusBar} from 'react-native'; | |
| import SideMenu from './Router.js' | |
| import Authentication from './Authentication/Authentication.js'; | |
| import Main from './Main/Main.js'; | |
| import ChangeInfo from './ChangeInfo/ChangeInfo.js'; | |
| import OrderHistory from './OrderHistory/OrderHistory.js'; |
This file contains hidden or 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
| import React from 'react'; | |
| import Link from 'next/link'; | |
| import { translate } from 'react-i18next'; | |
| import i18n from '../i18n'; | |
| import Frontend from '../components/frontend/Frontend/Frontend'; | |
| class Home extends React.Component { | |
| render() { | |
| return ( |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/gob" | |
| "net/http" | |
| "github.com/gin-gonic/gin" | |
| ) |
This file contains hidden or 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
| function compoundUnicode(str) { | |
| return `${str}` | |
| .replace(/\u0065\u0309/g, '\u1EBB') // ẻ | |
| .replace(/\u0065\u0301/g, '\u00E9') // é | |
| .replace(/\u0065\u0300/g, '\u00E8') // è | |
| .replace(/\u0065\u0323/g, '\u1EB9') // ẹ | |
| .replace(/\u0065\u0303/g, '\u1EBD') // ẽ | |
| .replace(/\u00EA\u0309/g, '\u1EC3') // ể | |
| .replace(/\u00EA\u0301/g, '\u1EBF') // ế | |
| .replace(/\u00EA\u0300/g, '\u1EC1') // ề |
This file contains hidden or 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
| package main | |
| import ( | |
| "log" | |
| "net" | |
| "os" | |
| "os/signal" | |
| "sync" | |
| "syscall" | |
| "time" |
This file contains hidden or 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
| # Add sudo to node runner | |
| sed -i "/node/s/^/sudo /" ~/.vscode-server/bin/*/server.sh | |
| # Restart remote vscode | |
| pkill -f vscode |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/json" | |
| "encoding/pem" | |
| "fmt" | |
| "log" |
OlderNewer