Skip to content

Instantly share code, notes, and snippets.

View RaedShari's full-sized avatar

Raed Shari RaedShari

View GitHub Profile
@saamerm
saamerm / SwiftUICoreMotionView.swift
Last active December 22, 2023 07:38
Sample using CoreMotion and SwiftUI to help understand how to use CMMotionManager and CoreMotion to get values of gravity, user acceleration, heading (2), attitude (pitch, roll, yaw), magnetic field
// Sample using CoreMotion and SwiftUI to help understand how to use CMMotionManager and CoreMotion to get values of gravity, user acceleration, heading (2), attitude (pitch, roll, yaw), magnetic field
// based on this beautiful example https://github.com/gsachin/DynamicFontRandD/blob/e4f7cc611d1d23573b4026bcc291bee60bf60e91/FontTextStrok/WaveView.swift
// that uses BAFluidView https://github.com/antiguab/BAFluidView
import SwiftUI
import CoreMotion
let timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
struct WaveView: View {
var motionManager = CMMotionManager()
@supermamon
supermamon / code.js
Last active January 3, 2024 13:01
Example Google Apps Script WebApp to read/append to a Spreadsheet
/*
How to setup
============
1. Go to https://script.google.com and login
2. Click New Project
3. Give the project a name be clicking on "Untitled Project" and giving a new name
4. Copy this whole code and overwrite everything on Code.gs file. Click on the Save icon to save.
5. Go to Google drive and open the worksheet that you want to manipulate
6. Take a look at the url. It should be in this format -- https://docs.google.com/spreadsheets/d/spreadheet-id-as-some-long-seemingly-random-characters/edit#gid=478439860
@gramcha
gramcha / having-multiple-jdk-macos.md
Created November 28, 2020 14:34
Managing multiple Java versions in MacOS

Installing different versions of open jdk through Homebrew(assuming already installed) and already having Java 8.

We need to install a tool called jenv - Java version manager which is similar to nvm(nodeJs version manager).

brew install jenv

Export the jenv path to .bash_profile or .zshrc - whatever you are using. I am using .zshrc

@Ryanb58
Ryanb58 / install.md
Last active May 17, 2024 13:42
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@MatthieuScarset
MatthieuScarset / sonar-project.properties
Created June 12, 2017 17:35
Default Sonar properties for Drupal 8 project
# must be unique in a given SonarQube instance
sonar.projectKey=ONE80WEB:ONE80WEB
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=WEBSITE
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=./web
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 21, 2024 05:35
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k