Skip to content

Instantly share code, notes, and snippets.

View iliyaZelenko's full-sized avatar
😌
Calm

Илья iliyaZelenko

😌
Calm
View GitHub Profile
@iliyaZelenko
iliyaZelenko / flutter_icons_generator.py
Last active April 21, 2022 14:17
Flutter svg icons generator to dart files with docs
import os
import re
# Relatively to "lib"
dartIconsPath = 'resources/icons/'
iconsDirectory = 'assets/icons/'
# Change string to lowerCamelCase
def to_camel(word):
@Ellrion
Ellrion / helpers.php
Last active August 11, 2017 08:27
extended laravel escaping with exclusion some tags
<?php
if (!function_exists('ex')) {
/**
* Escape HTML entities in a string with exclusion some tags.
*
* use in blade template `{!! ex($message, ['br', 'strong']) !!}`
*
* @param string $str
* @param string[] $excluded
@gokulkrishh
gokulkrishh / media-query.css
Last active May 5, 2024 08:25
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@yyx990803
yyx990803 / starcounter.js
Last active March 24, 2024 05:25
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active April 18, 2024 01:00
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