Skip to content

Instantly share code, notes, and snippets.

View nimi0112's full-sized avatar
🎯
Focusing

Nimish Nandwana nimi0112

🎯
Focusing
View GitHub Profile
@shiva27
shiva27 / SourceCodeLineCounter.java
Created December 5, 2011 04:24
Counting Source Code lines in a Java file
package examples;
import java.io.BufferedReader;
import java.io.IOException;
/**
* This class counts the number of source code lines by excluding comments, in a Java file
* The pseudocode is as below
*
* Initial: Set count = 0, commentBegan = false
@viktorbenei
viktorbenei / script_content.sh
Last active October 13, 2021 15:35
List available shared Schemes in an Xcode Project/Workspace file
#!/bin/bash
echo "=== List of available, **shared** Schemes ==="
set -x
# if you use a Workspace (.xcworkspace) file
xcodebuild -workspace $BITRISE_PROJECT_PATH -list
# or if you use a Project file (.xcodeproj) instead
xcodebuild -project $BITRISE_PROJECT_PATH -list
set +x
echo "============================================="
@parmentf
parmentf / GitCommitEmoji.md
Last active July 19, 2024 04:00
Git Commit message Emoji
@lopspower
lopspower / README.md
Last active July 20, 2024 20:26
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@sembozdemir
sembozdemir / App.java
Created July 3, 2016 17:55
Initializing Timber in the Application class
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
Timber.plant(BuildConfig.DEBUG
? new Timber.DebugTree()
: new CrashReportingTree());
@fbn4sc
fbn4sc / command.txt
Created January 29, 2018 01:35
Delete all branches except master and develop.
git branch | grep -v "master\|develop" | xargs git branch -D
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@trejo08
trejo08 / morse.rb
Last active December 30, 2022 05:26
Morse Code translator written in Ruby as solution of CodementorX Assessment.
class Morse
def posibilities(signals)
signals.include?('?') ? check_wildcard(signals) : morses["#{signals}"]
end
def check_wildcard(signals)
length = signals.split('').length
values = []
if length.eql?(1)
values = ["E", "T"]
@DineshKachhot
DineshKachhot / time_ago_since_now.dart
Created March 1, 2019 06:08
Flutter Time ago calculator
static String timeAgoSinceDate(String dateString, {bool numericDates = true}) {
DateTime date = DateTime.parse(dateString);
final date2 = DateTime.now();
final difference = date2.difference(date);
if ((difference.inDays / 365).floor() >= 2) {
return '${(difference.inDays / 365).floor()} years ago';
} else if ((difference.inDays / 365).floor() >= 1) {
return (numericDates) ? '1 year ago' : 'Last year';
} else if ((difference.inDays / 30).floor() >= 2) {
@alexjlockwood
alexjlockwood / RingOfCirclesView.kt
Last active January 10, 2024 14:07
Kotlin implementation of a Ring of Circles animation, inspired by https://twitter.com/InfinityLoopGIF/status/1101584983259533312
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View
private const val N = 16
private const val PERIOD1 = -10000.0
private const val PERIOD2 = -500.0