Skip to content

Instantly share code, notes, and snippets.

View caner-cetin's full-sized avatar
💭
sagoluyor

sagokafkef caner-cetin

💭
sagoluyor
  • San Antonio
  • 05:28 (UTC +03:00)
View GitHub Profile
@ihatecsv
ihatecsv / README.md
Last active March 1, 2023 14:14
RGB VSCode
  1. Follow the instructions to install Custom CSS and JS Loader for VSCode

  2. Make a file with the rgbcode.css content, and follow the instructions in the above link to add the file path to the settings.json. For example, mine is:

"vscode_custom_css.imports": ["file:///C:/Users/drake/Documents/rgbcode/rgbcode.css"]
@umutozd
umutozd / task.md
Last active January 31, 2023 11:25
Transparent Restaurant Backend

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@digitaltembo
digitaltembo / text_box.py
Created March 19, 2019 01:50
Drawing within a Text Box in Python Pillow (PIL fork)
"""
Draws the text <text> on the ImageDraw <image_draw> in the box (specified as a 4-ple of [x,y,width,height])
with the font <font> and the allignments as given. Passes other arguments to the ImageDraw.text function
(for example, fill is a good one to use here).
Can be used to center text horizontally and vertically, as well as right-align and bottom-allign (although it defaults to
left- and top-allignment). Nothing is done to prevent overflow, but the y and height values from the box will be used for vertical
allignment
Example usage:
@pascalandy
pascalandy / my-custom.cnf
Last active November 20, 2022 09:30
This mysql config is made to run within the official mysql container.
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
#
# _dockerfile/mysql/conf.d/my.cnf
# Last update: 2017-01-05_10h05
#
# This mysql config is made to run within the official mysql container.
# https://hub.docker.com/_/mysql/
#
# Inspired by:
# https://www.percona.com/blog/2016/10/12/mysql-5-7-performance-tuning-immediately-after-installation/
@carolineschnapp
carolineschnapp / hide variant images.md
Created February 18, 2016 20:11
Hide variant images on the product page, so that a variant image is shown as main image only when its corresponding variant is selected.

The goal

Hide the thumbnails of variant images on the product page.

How to do that

  1. Add a class of 'variant-image' to the wrapper of each thumbnail that is a variant image. See first product.liquid snippet.
  2. Hide all .variant-image elements with CSS in the theme's stylesheet. See second style.scss.liquid snippet.
@kkirsche
kkirsche / aes256-gcm.go
Last active February 23, 2024 14:56
AES-256 GCM Encryption Example in Golang
package example_test
import (
"crypto/aes"
"crypto/cipher"
"hex"
"io"
)
// AES-GCM should be used because the operation is an authenticated encryption