If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
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.
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.
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() |
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 = "" |
#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) |
# 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 " + |
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.
Translations: (No guarantee that the translations are up-to-date)
#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