Skip to content

Instantly share code, notes, and snippets.

View chibaye's full-sized avatar

chibaye chibaye

View GitHub Profile
@chibaye
chibaye / nginx_macos.md
Created May 30, 2024 18:52 — forked from osamaqarem/nginx_macos.md
Nginx on MacOS

Install nginx (Homebrew)

brew install nginx

Configuration file for nginx will be at /usr/local/etc/nginx/nginx.conf

Web apps can be stored at /usr/local/var/www

Commands

Start:

@chibaye
chibaye / AndroidManifest.xml
Created May 11, 2024 19:05 — forked from JosiasSena/AndroidManifest.xml
Sync Adapter example
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.packagename">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<application
@chibaye
chibaye / countries.php
Created April 30, 2024 13:16 — forked from davmixcool/countries.php
Country Name, Codes, Currency and Symbols
<?php
$countries = array(
array('name' => 'Afghanistan','iso_alpha2' => 'AF','iso_alpha3' => 'AFG','iso_numeric' => '4','calling_code' => '93','currency_code' => 'AFN','currency_name' => 'Afghani','currency_symbol' => '؋'),
array('name' => 'Albania','iso_alpha2' => 'AL','iso_alpha3' => 'ALB','iso_numeric' => '8','calling_code' => '355','currency_code' => 'ALL','currency_name' => 'Lek','currency_symbol' => 'Lek'),
array('name' => 'Algeria','iso_alpha2' => 'DZ','iso_alpha3' => 'DZA','iso_numeric' => '12','calling_code' => '213','currency_code' => 'DZD','currency_name' => 'Dinar','currency_symbol' => ''),
array('name' => 'American Samoa','iso_alpha2' => 'AS','iso_alpha3' => 'ASM','iso_numeric' => '16','calling_code' => '1684','currency_code' => 'USD','currency_name' => 'Dollar','currency_symbol' => '$'),
array('name' => 'Andorra','iso_alpha2' => 'AD','iso_alpha3' => 'AND','iso_numeric' => '20','calling_code' => '376','currency_code' => 'EUR','currency_name' => 'Euro','currency_symbol' => '€'),
array
@chibaye
chibaye / countries.json
Created April 30, 2024 13:16 — forked from tiagodealmeida/countries.json
List of countries with country code, name, currency code, population, capital and continent name in JSON format
{
"countries": {
"country": [
{
"countryCode": "AD",
"countryName": "Andorra",
"currencyCode": "EUR",
"population": "84000",
"capital": "Andorra la Vella",
"continentName": "Europe"
@chibaye
chibaye / changing_time_zones.sh
Created March 24, 2024 06:41 — forked from ddre54/changing_time_zones.sh
Mac OS X - Terminal commands for changing time zones in the machine
# Useful for testing things that are time zone
# sensitive - like scheduling things
# Get current timezone
sudo systemsetup -gettimezone
# Get list of available timezones
sudo systemsetup -listtimezones
# Set the timezone to the selected timezone
@chibaye
chibaye / world_currency_symbols.json
Created March 6, 2024 19:39 — forked from manishtiwari25/world_currency_symbols.json
List Of World Currency with symbols, Updated On 03/01/2024 00:00:02
[
{
"Flag": "https://www.currencyremitapp.com/wp-content/themes/currencyremitapp/images/countryimages/albania.png",
"CountryName": "Albania",
"Currency": "Lek",
"Code": "ALL",
"Symbol": "Lek"
},
{
"Flag": "https://www.currencyremitapp.com/wp-content/themes/currencyremitapp/images/countryimages/afghanistan.png",
@chibaye
chibaye / recipes.md
Created March 1, 2024 11:55 — forked from tsg/recipes.md
Loading recipes for search testing

Testing

CREATE TABLE recipes(
	title text,
	ingredients text,
	directions text,
	link text,
	source text,
	ner text, 
@chibaye
chibaye / gen-certs.sh
Created February 22, 2024 08:30 — forked from notmedia/gen-certs.sh
Creating Self-Signed certificates
rm *.pem
rm *.srl
rm *.cnf
# 1. Generate CA's private key and self-signed certificate
openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca-key.pem -out ca-cert.pem -subj "/C=FR/ST=Occitanie/L=Toulouse/O=Test Org/OU=Test/CN=*.test/emailAddress=test@gmail.com"
echo "CA's self-signed certificate"
openssl x509 -in ca-cert.pem -noout -text
@chibaye
chibaye / self-signed-certificate-with-custom-ca.md
Created February 21, 2024 12:32 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@chibaye
chibaye / self_signed_certs.md
Created February 21, 2024 12:31 — forked from elklein96/self_signed_certs.md
A quick guide for creating self-signed certificates using OpenSSL

Creating a Self-Signed Certificate

Prerequisites

  • You'll need to install OpenSSL to create and sign certificates.
    • Linux: sudo apt-get install openssl
    • MacOS: brew install openssl

Getting Started