Skip to content

Instantly share code, notes, and snippets.

View gkio's full-sized avatar
🏠
Working from home

Giorgi gkio

🏠
Working from home
View GitHub Profile
@ufologist
ufologist / jquery-sanitize-html.html
Last active March 26, 2023 00:07 — forked from kaznum/gist:3810258
sanitize HTML with jQuery prevent Application from XSS attacks
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Sanitize HTML with jQuery</title>
</head>
<body>
<h1>Sanitize HTML with jQuery</h1>
<h2>HTML Code</h2>
@markerikson
markerikson / redux-thunk-examples.js
Last active September 4, 2022 11:12
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}),
error => dispatch({type : "REQUEST_FAILED", error : error})
);
@anandgorantala
anandgorantala / 1_docker-micro-services.txt
Last active January 23, 2020 21:39
Docker setup for nodejs microservices with nginx and rethinkdb
# This shows the setup for two services, an accounts service which connects to a database and a pagerduty service which connects to the pagerduty api
# Directory structure
accounts/
|_ Dockerfile
pagerduty/
|_ Dockerfile
nginx/
|_ conf/
|_ sites.conf
|_ .htpasswd
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"