Skip to content

Instantly share code, notes, and snippets.

View selcukcihan's full-sized avatar
🐢
engineering

Selçuk Cihan selcukcihan

🐢
engineering
View GitHub Profile
@selcukcihan
selcukcihan / index.js
Created March 31, 2020 12:56
Native modül kullanımına örnek
import {DEFAULT_SLEEP_MILLISECONDS, sleep} from './utils.js'
console.log(`${DEFAULT_SLEEP_MILLISECONDS} milisaniye uyuyalım `);
sleep()
.then(_ => {
console.log(`3000 milisaniye uyuyalım `);
return sleep(3000);
});
@selcukcihan
selcukcihan / index.js
Created March 31, 2020 13:07
Native modül, default export'lu örnek
import sleep from './utils.js'
console.log(`3000 milisaniye uyuyalım `);
sleep(3000);
@selcukcihan
selcukcihan / index.js
Created April 3, 2020 12:11
CJS (CommonJS, native olmayan modüller)
const utils = require('./utils.js');
console.log(`${utils.DEFAULT_SLEEP_MILLISECONDS} milisaniye uyuyalım `);
utils.sleep()
.then(_ => {
console.log(`3000 milisaniye uyuyalım `);
return utils.sleep(3000);
});
@selcukcihan
selcukcihan / index.js
Created April 3, 2020 12:25
CJS (CommonJS, native olmayan modüller) alternatif kullanım
const utils = require('./utils.js');
console.log(`${utils.DEFAULT_SLEEP_MILLISECONDS} milisaniye uyuyalım `);
utils.sleep()
.then(_ => {
console.log(`3000 milisaniye uyuyalım `);
return utils.sleep(3000);
});
@selcukcihan
selcukcihan / index.html
Created April 3, 2020 14:04
Native modül kullanımına ön-yüz örneği
<!doctype HTML>
<html>
<head></head>
<body>
<button id="uykuButonu">Uyu</button>
<script type="module" src="./utils.js"></script>
<script type="module" src="./index.js"></script>
</body>
</html>
@selcukcihan
selcukcihan / aws-certification-cheat-sheet.md
Created June 10, 2020 11:34
Cheat sheet for aws certification exams.

S3

  • By default all new buckets are private
  • You can have bucket policies and ACLs (ACL can go down to individual objects)
  • Read after write consistency for puts of new objects
  • Eventual consistency for overwrite PUTs and DELETEs
  • Storage classes
    • S3 standard (99.99 availability, 11 9s durability) can sustain loss of 2 facilities concurrently
    • S3-IA lower fee than S3 but you are charged a retrieval fee (99.9% availability)
    • S3 One Zone - IA lower cost option if you don't need multi AZ data resilience (99.5% availability)
  • S3 Intelligent Tiering
@selcukcihan
selcukcihan / aws-solutions-architect-pro-exam_notes.md
Last active May 26, 2025 03:17
Cheat sheet for AWS Solutions Architect Professional Exam

AWS Solutions Architect Professional Exam Notes

Data Storage

  • Persistent stores: glacier, RDS

  • Transient stores: SQS, SNS

  • Ephemeral stores: EC2 instance, Memcached

  • IOPS: how fast we can read/write

  • Throughput: how much data can be moved at a time

function recurse(current: string, remaining: { left: number; right: number; }) {
if (remaining.left === 0 && remaining.right === 0) {
return [current]
} else {
let result = []
// check if we can go with a "("
if (remaining.left) {
let balance = 0
for (const s of current) {
if (s === '(') {
import http.client
original_request = http.client.HTTPConnection.request
intercepted_requests = []
def intercepted_request(self, *args, **kwargs):
intercepted_requests.append(args[1][1:])
return original_request(self, *args, **kwargs)
# intercept requests

serverless_sdk/sdk.py

print("importing sdk")
class FooClass:
    pass

Foo = FooClass()

serverless_sdk/init.py