Skip to content

Instantly share code, notes, and snippets.

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

Oguz Vuruskaner ovuruska

🏠
Working from home
View GitHub Profile
@davoclavo
davoclavo / metaplex.md
Created October 11, 2021 16:13
Deploy Metaplex suite to local cluster

Deploy Metaplex

git clone git@github.com:metaplex-foundation/metaplex.git

cd metaplex/rust

cargo build-bpf

solana config set --url localhost

solana-test-validator

#!/usr/bin/env python
"""
Bundle the site-packages of the current python environment into a zip file
If you have any wheels at `$(pwd)/wheels`, those will be used instead of
of the locally installed packages. For instance, if my pwd looked like
wheels/
|-- numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 28, 2024 04:00
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jacknlliu
jacknlliu / env-Dockerfile
Last active May 7, 2024 11:57
use variable "DEBIAN_FRONTEND noninteractive" to apt-get noninteractive install and set environment and use shell script in Dockerfile
ENV QT_BASE_DIR=/opt/qt55
ENV QTDIR=$QT_BASE_DIR
ENV PATH=$QT_BASE_DIR/bin:$PATH
ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
# Reconfigure locale
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
# Docker offical ENVIRONMETN REPLACEMENT
@shayousefi
shayousefi / color_conversion.py
Created August 8, 2016 17:10
RGB<->Hex conversion using NumPy.
import numpy as np
def rgb_to_hex(rgb: np.ndarray) -> str:
rgb = rgb.reshape(3)
return '#{:02X}{:02X}{:02X}'.format(*rgb)
def hex_to_rgb(hex_str: str) -> np.ndarray:
hex_str = hex_str.strip()
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@eabay
eabay / validate-tr-license-plate.coffee
Last active April 14, 2023 15:15
Türkiye plaka kodu için regular expression
validate = (val) ->
# boşluk karakterlerini kaldıralım
v = val.replace(/\s+/g, '').toUpperCase()
# http://tr.wikipedia.org/wiki/Türkiye_il_plaka_kodları adresindeki bilgi kullanılmıştır.
regex = /// ^
(0[1-9]|[1-7][0-9]|8[01]) # İl kodu
(
([A-Z])(\d{4,5}) # "99 X 9999", "99 X 99999"
| ([A-Z]{2})(\d{3,4}) # "99 XX 999", "99 XX 9999"
@candycode
candycode / image-arraybuffer.js
Created March 7, 2014 15:24
Create a jpg image from ArrayBuffer data
// Simulate a call to Dropbox or other service that can
// return an image as an ArrayBuffer.
var xhr = new XMLHttpRequest();
// Use JSFiddle logo as a sample image to avoid complicating
// this example with cross-domain issues.
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true );
// Ask for the result as an ArrayBuffer.
xhr.responseType = "arraybuffer";
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active June 21, 2024 07:34
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1