Skip to content

Instantly share code, notes, and snippets.

View danielturus's full-sized avatar
🎯
Focusing

Daniel Turuș danielturus

🎯
Focusing
View GitHub Profile
@danielturus
danielturus / publickey-git-error.markdown
Created November 8, 2017 11:33 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@danielturus
danielturus / countriesList.json
Created January 8, 2019 11:43
Listă JSON cu țările de pe glob / A JSON list of countries in Romanian
[
{
"numeScurt": "Afganistan",
"numeOficial": "Republica Islamică Afganistan"
},
{
"numeScurt": "Africa de Sud",
"numeOficial": "Republica Africa de Sud"
},
{
@danielturus
danielturus / countiesList.json
Created January 8, 2019 11:50
Listă județe în România / JSON list of counties in Romania
[
{
"auto": "AB",
"nume": "Alba"
},
{
"auto": "AR",
"nume": "Arad"
},
{
/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
@danielturus
danielturus / filters.js
Created February 8, 2019 13:07
Vuejs filters - Register multiple filters globally in VueJS (NuxtJS)
import Vue from 'vue'
export function formatDateRo(date) {
return new Date(date).toLocaleDateString('ro-RO')
}
export function roundToTwo(num) {
return +(Math.round(num + 'e+2') + 'e-2')
}
@danielturus
danielturus / commands.txt
Created February 12, 2019 12:19 — forked from JesseRWeigel/commands.txt
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)
@danielturus
danielturus / usersettings.json
Created February 9, 2019 08:34
VSCode settings
{
"editor.tabSize": 4,
"editor.detectIndentation": false,
"telemetry.enableTelemetry": false,
"workbench.startupEditor": "newUntitledFile",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"emmet.includeLanguages": {
"vue-html": "html"
},
"explorer.confirmDelete": false,
@danielturus
danielturus / countries.ts
Created May 9, 2021 07:15
Complete list of countries with ISO code
export interface Country {
name: string
code: string
}
export const CountryList: Country[] = [
{ name: "Afghanistan", code: "AF" },
{ name: "Albania", code: "AL" },
{ name: "Algeria", code: "DZ" },
{ name: "American Samoa", code: "AS" },
@danielturus
danielturus / eu-countries.ts
Created May 17, 2021 18:25
Complete list of EU countries
export type EUCountry = {
name: string
currency: string
code: string
}
export const EU_COUNTRIES: EUCountry[] = [
{
name: 'Austria',
currency: 'euro',
@danielturus
danielturus / index.md
Last active August 14, 2021 13:27
Mac related settings

Disable Spotlight

https://apple.stackexchange.com/questions/144474/mds-and-mds-stores-constantly-consuming-cpu

As you know, the mds and mds_stores are Spotlight activities.

The reason why your Spotlight is so active could be a number of things; it could be you have an app or multiple apps constantly changing some folder contents.

First let's check whether Spotlight is the cause of the fans running so much. To test this, run the following in your terminal: