Skip to content

Instantly share code, notes, and snippets.

kerem keremtiryaki

View GitHub Profile
View request-a-post-body-to-vercel-zeit-serverless-api-by-nodejs.js
var options = {
'method': 'POST',
'hostname': "apipipi.now.sh",
'path': "/api/enpoint1",
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = require('https').request(options);
View react-native-whatsapp-web-sample.js
<WebView
source={{
uri: 'https://web.whatsapp.com/',
}}
userAgent={'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15'}
/>
View node-request-and-forget-sample.js
// don't wait for a response
const https = require('https');
let requestAndForget = async (host, path, message) => {
message = JSON.stringify(message);
var options = {
hostname: host,
method: 'POST',
path: path,
headers: {
'Content-Type': 'application/json',
View gist:86bf5808764cc3800743693fad326de1
you may download it via powershell
wget "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -outfile "chrome_installer.exe"
View update root css var by javascript
document.documentElement.style.setProperty('--your-variable', '#YOURCOLOR');
@keremtiryaki
keremtiryaki / keyBindings.json
Last active Aug 7, 2018
vscode user settings and key bindings
View keyBindings.json
// Place your key bindings in this file to overwrite the defaults
[
// FOLD START
{
"key": "cmd+alt+ctrl+up",
"command": "editor.foldRecursively",
"when": "editorTextFocus"
},
{
"key": "cmd+alt+ctrl+down",
@keremtiryaki
keremtiryaki / keybindings.json
Last active Oct 22, 2016
vscode eclipse like keybindings.json
View keybindings.json
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+h", "command": "workbench.view.search" },
{ "key": "cmd+alt+up", "command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "cmd+alt+down", "command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "cmd+k", "command": "editor.action.nextSelectionMatchFindAction",
View Monte Carlo simulation.js
/*************************************************
* This is a simple Monte Carlo simulation to see
* whether we should
* go for X BIG deal and/or Y SMALL deals.
*
* What is the best blend?
*
* Author: Ido Green | plus.google.com/+greenido
* Date: 16 July 2013
*
@keremtiryaki
keremtiryaki / howTo.md
Last active Mar 30, 2016
how to create a self signed certificate and upload to AWS
View howTo.md
@keremtiryaki
keremtiryaki / Data.json
Last active Aug 17, 2019
Security Rules & queries
View Data.json
var a = {
"members" : {
"userId1" : {
"team" : "team1",
"team_id" : "teamId1",
"url" : "https://team1.slack.com/",
"user" : "name1",
"user_id" : "userId1"
},
"userId2" : {
You can’t perform that action at this time.