Skip to content

Instantly share code, notes, and snippets.

View iraklisg's full-sized avatar

iraklisg iraklisg

  • Athens, Greece
View GitHub Profile
@llbbl
llbbl / gist:b08ed19281c06483242b
Last active March 9, 2022 05:15
Howto Add PhpStorm to Ubuntu Unity Launcher

PhpStorm 7.0x

Create a file ~/.local/share/applications/jetbrains-phpstorm.desktop

With the following value:

@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@ghinda
ghinda / object-to-form-data.js
Last active March 30, 2024 18:51
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active April 13, 2024 16:19
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active April 3, 2024 06:54
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@fideloper
fideloper / start-container.sh
Last active August 31, 2021 10:59
Enable/Disable xDebug depending on env.
#!/usr/bin/env bash
###
# A CMD or ENTRYPOINT script for a Dockerfile to use to start a Nginx/PHP-FPM
#
# For more details, see 🐳 https://shippingdocker.com
##
if [ ! "production" == "$APP_ENV" ] && [ ! "prod" == "$APP_ENV" ]; then
# Enable xdebug
@mentos1386
mentos1386 / Webstorm-Airbnb-Javascript-codeStyle.xml
Created March 12, 2017 11:03
Airbnb inspired Webstorm Javascript CodeStyle
<code_scheme name="Airbnb">
<option name="RIGHT_MARGIN" value="100" />
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
<option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="" />
<option name="HTML_ENFORCE_QUOTES" value="true" />
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
@automaticit
automaticit / hide-quantum-tab-bar.sh
Created November 21, 2017 13:05
Hide Firefox Quantum tab bar
#!/bin/bash
#
# Based upon [[https://superuser.com/questions/1268732/how-to-hide-tab-bar-tabstrip-in-firefox-57-quantum/1268734#1268734][How to hide tab bar (tabstrip) in Firefox 57+ Quantum]] by [[https://superuser.com/users/162466/vasyanovikov][VasyaNovikov]]
# This causes the [[https://support.mozilla.org/en-US/questions/1187186][The Back Button is top right under the Red close button on my Mac]] issue.
# Resolve that by right-clicking the toolbar, then inserting three Flexible Space into the toolbar on the far-left-hand side.
case $( uname ) in
"Linux")
profile_dir=~/.mozilla/firefox/$( ls -tr ~/.mozilla/firefox/ | grep -v profiles.ini | tail -1 )
;;
"Darwin")
1. Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
2. Clone necessary plugins.
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
3. Add plugins to ~/.zshrc as
plugins = ( [plugins...] zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
@EmadAdly
EmadAdly / Add-ESLint-to-Laravel-Mix.md
Last active January 20, 2024 16:55
Adding eslint to your Laravel application

1. Add eslint and eslint-loader and eslint-plugin-vue to your projects package.json file

npm i eslint eslint-loader eslint-plugin-vue --save-dev

2. Create a base configuration by --init