Skip to content

Instantly share code, notes, and snippets.

View ceaksan's full-sized avatar
🤹

Ceyhun Aksan ceaksan

🤹
View GitHub Profile
cv = {}
cv[0] = {'name': 'John', 'surname': 'Doe', 'title': 'Manager', 'department': 'Sales', 'salary': 10000, 'age': 34}
cv[1] = {'name': 'Robin', 'surname': 'Hood', 'title': 'Manager', 'department': 'Marketing', 'salary': 13000, 'age': 30}
cv[2] = {'name': 'Robin', 'surname': 'Chadler', 'title': 'Specialist', 'department': 'Marketing', 'salary': 10500, 'age': 27}
cv[3] = {'name': 'Abigail', 'surname': 'Brand', 'title': 'Engineer', 'department': 'IT', 'salary': 14500, 'age': 31}
cv[4] = {'name': 'Bruce', 'surname': 'Wayne', 'title': 'Founder', 'department': 'CTO', 'salary': 200000, 'age': 38}
for i in cv:
print(f'Person: {i+1}')
import random
odd = random.sample(range(1, 10), 5)
even = random.sample(range(2, 11), 5)
merged = odd + even
for k in [i*2 for i in merged if(type(i)==int)]:
print(k)

flowchart TD A[[sitemap.xml]] B([posts.xml]) C([pages.xml]) D([taxonomy.xml]) E([products.xml]) F([images.xml]) G([...more])

subgraph SiteMapIndex

any(grepl("curl", installed.packages()))
any(grepl("XML", installed.packages()))
library(curl)
library(XML)
getURL <- function(url) {
getExtension <- function(url){
ex <- strsplit(basename(url), split="\\.")[[1]]
return(ex[-1])
<?php
#
#
# Parsedown
# http://parsedown.org
#
# (c) Emanuil Rusev
# http://erusev.com
#
<?php
#
#
# Parsedown Extra
# https://github.com/erusev/parsedown-extra
#
# (c) Emanuil Rusev
# http://erusev.com
#
{
"should_show_receipt": false,
"has_content": false,
"show_view_content_button_on_product_page": false,
"is_recurring_billing": false,
"is_physical": false,
"has_files": false,
"product_id": "rae5efQk--KQcApU4cUkjw==",
"is_gift_receiver_purchase": false,
"gift_receiver_text": " bought this for you.",
@ceaksan
ceaksan / nexGENGalleryImageClick.php
Created September 30, 2020 16:59
WordPress Plugin: nexGEN Gallery Image clicks to GA/GTM
<?php
/**
* Plugin Name: WP NextGENGalery Image Clicks
*/
add_action('wp_footer', 'nextGENGallery_enqueue_custom_js');
function nextGENGallery_enqueue_custom_js() {
if(is_page()) {
global $post;
package main
import (
"fmt"
)
func fibonacci(n int, c chan int) {
x, y := 0, 1
for i := 0; i < n; i++ {
c <- x
package main
import "fmt"
func sum(a []int, c chan int) {
sum := 0
for _, v := range a {
sum += v
}
fmt.Println(sum, c)