Skip to content

Instantly share code, notes, and snippets.

View harsh183's full-sized avatar
😺
People pleasing users

Harsh Deep harsh183

😺
People pleasing users
View GitHub Profile
@ThePredators
ThePredators / readme-mde.md
Last active April 9, 2024 21:43
Setup Mobile Development Environment

⭐ Setup Mobile Development Environment

⚠️ The following configuration has been tested on Intel, M1 & M2 Ships ⚠️

Pre-requisit :

If you have any issues with macOS, or need anything related to it check this documentation

Install Xcode Command Line tools :

@tatianamac
tatianamac / tatiana-mac-boycott-list.md
Last active August 13, 2022 00:16
Tatiana Mac's Boycott List

Brands I Boycott and Why

An ever-evolving list of brands I boycott and why as well as the last date I supported them. I'll continue to update this list as I learn more and detach myself from the firm grip of big tech and corporatism.

I recognise, as a tech worker, that we've created quite the hydra, so detaching ourselves becomes much more complicated than it ever should be. I also recognise that like the capitalistic umbrella tech operates under, we are somewhat stuck using certain technologies (for example, I am writing this here on GitHub, which refuses to drop ICE as a contract.).

I am not perfect and recognise this can be seen as moralistic. I am doing this to share information that may help influence your decisions. They may not. That's up for you to decide.

My hope is to encourage everyone to be more thoughtful in how they vote with their wallets.

Helpful Websites

@Saakshaat
Saakshaat / idea.md
Last active June 29, 2020 08:24
Terminal Notes

Terminal

Terminal's every developer's best friend; I use mine terminal for almost everything, writing/executing custom scripts, restarting Spotify, opening different IDEs/Editors and what not.

When a new session pops up, my main focus is make minimal efforts and optimise productivity, which, for me is driven by streamlining my priorites and deliverables.

Thus, I had to find a way to combine my terminal and notes/TODOs, and here we are.

Setup

@sureshbabua8
sureshbabua8 / app.kt
Last active January 13, 2020 00:11
Simple GET Request in Kotlin
import com.squareup.moshi.JsonClass
import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import okhttp3.OkHttpClient
import okhttp3.Request
import java.io.IOException
class ParseResponseWithMoshi {
private val client = OkHttpClient()
private val moshi = Moshi.Builder().add(KotlinJsonAdapterFactory()).build()
@gtr
gtr / cats.jpg
Last active March 14, 2020 10:32
cats.jpg
@harsh183
harsh183 / numbersToWords.rb
Last active November 5, 2017 11:03
To convert number to words in ruby (for any positive integer)
def toWords(num)
units = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine']
tens = ['', '', 'Twenty', 'Thirty', 'Fourty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety']
teens = ['Ten', 'Eleven', 'Tweleve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen',
'Seventeen', 'Eighteen', 'Nineteen']
units_digit = num % 10
tens_digit = num / 10
number_in_words = ""
@jirihnidek
jirihnidek / getaddrinfo_example.c
Last active October 31, 2023 20:09
Example of getaddrinfo() program.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int
lookup_host (const char *host)
@0cjs
0cjs / initialize_vars.rb
Last active September 4, 2022 16:40
Replace boilerplate Ruby `def initialize` followed by instance variable settings with `initialize_vars` specifying variables once
# XXX This worked in 2009 with Ruby 1.8; I've not tested on anything
# more recent. But you get the general idea.
class Class
def initialize_vars(*vars, &initialize_block)
vars.each { |arg| attr_reader arg.to_sym }
varsyms = vars.collect { |arg| ('@' + arg.to_s).to_sym }
define_method(:initialize) { |*init_args|
raise(ArgumentError, "wrong number of arguments " +
@lukas-h
lukas-h / license-badges.md
Last active May 1, 2024 10:20
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active January 17, 2024 23:54
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps