Skip to content

Instantly share code, notes, and snippets.

View karimkod's full-sized avatar
⌨️
*Keyboard clicks*

Bourennane Abdelkrim karimkod

⌨️
*Keyboard clicks*
View GitHub Profile
oh-my-posh init pwsh | Invoke-Expression
oh-my-posh init pwsh --config "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/microverse-power.omp.json" | Invoke-Expression
@karimkod
karimkod / actionlist.vim
Created March 5, 2024 10:38 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
set -g default-terminal "screen-256color"
#set -g prefix C-a
#
#unbind C-b
#
#bind-key C-a send-prefix
unbind %
bind | split-window -h
@karimkod
karimkod / .ideavimrc
Last active March 28, 2024 14:29
ideavimrc
let mapleader = " "
set visualbell
set noerrorbells
set surround
set multiple-cursors
set scrolloff=5
set idearefactormode=keep
set relativenumber number
set ideajoin
@karimkod
karimkod / custom_radio_button.dart
Created September 30, 2021 23:03
Custom radio button
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
const double _kOuterRadius = 8.0;
const double _kInnerRadius = 4.5;
@karimkod
karimkod / replaceSingleQuoteWithDoubleQuote.js
Created October 30, 2020 10:28
RegEx used with String.protoype.replace to replace all single quotes with double quotes in the text and ignoring single quotes used for contractions.
//Replace Single quote with double quote in a text regularExpression.
let reg = /([^\w])'(.+)'([^\w])/ig;
let text = "and then he said : 'Oh no rick, don't kill me please'. And rick replied : 'frick off kid' knowing he won't.";
let replaced = text.replace(reg, '$1"$2"$3');
@karimkod
karimkod / AndroidManifest.xml
Created July 12, 2020 18:12
AndroiManifest that will work for Oculus go in Unity
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<uses-feature android:name="android.hardware.vr.headtracking" android:required="false"/>
<!-- Request the headset DoF mode -->
<application>
<activity
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Interpolator : MonoBehaviour
{
[Range(0,1)]
[SerializeField] private float interpolationParam;
[SerializeField] private Vector3 destinationPosition;
@karimkod
karimkod / WWWFormAddFieldsFromObject.cs
Last active January 5, 2020 14:46
An extension method for WWWForm to add fields from public fields of an instance of a class
using System.Reflection;
using System;
using UnityEngine;
public static class WWWFormExt{
public static void AddFieldsFromObject<T>(this WWWForm form, T sourceObject)
{
var serializableAttr = Attribute.GetCustomAttribute(sourceObject.GetType(), typeof(SerializableAttribute));
var type = typeof(T);