Skip to content

Instantly share code, notes, and snippets.

View ajimae's full-sized avatar

Ajima Chukwuemeka ajimae

View GitHub Profile
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@ajimae
ajimae / _screenshot.md
Created March 29, 2024 03:28 — forked from kamilogorek/_screenshot.md
Clutter-free VS Code Setup
image
@ajimae
ajimae / ipc.example.js
Created September 14, 2023 10:25 — forked from Xaekai/ipc.example.js
Example of Interprocess communication in Node.js through a UNIX domain socket
/*
**
** Example of Interprocess communication in Node.js through a UNIX domain socket
**
** Usage:
** server> MODE=server node ipc.example.js
** client> MODE=client node ipc.example.js
**
*/
import React, { useEffect, useRef } from "react";
import {
StyleSheet,
View,
Animated,
Keyboard,
TextInput,
} from "react-native";
export default function App() {
@ajimae
ajimae / .gist
Created March 25, 2023 21:09 — forked from diegoareval/.gist
How to setup react native on mac environment
---------------------------xcode conf----------------------
1- install xcode from AppStore
2 - search xcode preferences
3 - it will open xcode dialog then move to components tab(to install your ios emulator, select one and download it)
4- then move account tab, and select apple id( context menu option) then put your apple id. then close the dialog xcode
5- open xcode again and create a new project (single view app) then name it, whatever you want, click next
6- after the project was created, then the project, you need to click root file inside the project and select "sign in and capabilities
and then select your user(apple id)
7- change the bundle identifier, if is necessary
8- then select your emulator installed and build the project, finally , you will see your hello world project.
@ajimae
ajimae / cci-node-multiversion-after-example.yml
Created September 16, 2022 10:09 — forked from FelicianoTech/cci-node-multiversion-after-example.yml
An example CircleCI 2.1 config building with multiple versions of Node.js.
version: 2.1
workflows:
main:
jobs:
- unit-tests:
version: 6
- unit-tests:
version: 8
- unit-tests:
@ajimae
ajimae / react-native-setup-ios.sh
Created May 9, 2022 12:37 — forked from pzatorski/react-native-setup-ios.sh
Clean a React Native project (iOS)
#!/bin/bash
# exit when any command fails
set -e
COMMAND=$1
function clean() {
printf "🧹 Cleaning.. \n"
rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData
@ajimae
ajimae / mac-setup-redis.md
Created February 7, 2022 21:54 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@ajimae
ajimae / Scroll to index Flatlist example.md
Created December 19, 2021 16:26 — forked from hungdev/Scroll to index Flatlist example.md
Scroll to index Flatlist example
import React, { Component } from 'react';
import { Text, View, FlatList, Dimensions, Button, StyleSheet } from 'react-native';

const { width } = Dimensions.get('window');

const style = {
  justifyContent: 'center',
  alignItems: 'center',
  width: width,
@ajimae
ajimae / json-processor.js
Created September 5, 2021 03:22 — forked from jozefcipa/json-processor.js
Process large JSON files with streams
import fs from 'fs'
import { Transform } from 'stream'
import JSONStream from 'JSONStream'
// Custom transform stream
const transformer = new Transform({
objectMode: true,
transform(jsonItem, encoding, callback) {
// your logic goes here...
// const updatedItem = {}