Skip to content

Instantly share code, notes, and snippets.

@lukaskleinschmidt
lukaskleinschmidt / app.scss
Last active September 16, 2024 14:38
Utility class generator like tailwindcss but in pure Sass.
@use 'sass:map';
@use 'variants' as * with (
$breakpoints: (
'small': 640px,
'medium': 768px,
'large': 1024px,
'wide': 1280px,
)
);
@haman29
haman29 / a.md
Last active June 16, 2022 20:25
ssh時にlocale周りでja_JP.UTF-8設定しようとしてwarningが出る問題の対処

エラー内容

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "ja_JP.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
@ankurk91
ankurk91 / git_remember_password.md
Last active October 8, 2024 06:46
Git credential cache, why type password again and again

Tired of entering passwords again and again ?

Run this command to remember your password:

git config --global credential.helper 'cache --timeout 28800'

Above command will tell git to cache your password for 8 hours.

The Laracasts PHPStorm theme - modified.

This is a slightly modified version of the great Laracasts PHPStorm theme. I've added some styles for Verions Control (add, modified, deleted line...) and fixed some missing things like warnings.

Download

image

Mac: Add to ~/Library/Preferences/WebIde80/colors

@atushi
atushi / How_to_set_about_log_bin_trust_function_creators_parameter_is_ENABLED_for_RDS.md
Last active May 7, 2018 02:13
AWS RDSに log_bin_trust_function_creators parameter is ENABLED を設定

前提

  • default の Parameter Group は変更出来ない
    (こんなメッセージが出力される。 rds-modify-db-parameter-group: Malformed input-Cannot modify a default parameter group.)

e.g.

Parameter Group を Management Console 上で作成

  • Parameter Groups -> Create DB Parameter Group に遷移
  • default parameterが Name: default.mysql5.5、Family : mysql5.5 なので、Name: mysql5-5-for-trigger 、Family : mysql5.5 を作成
  • Management Consoleで対象のRDS instanceのParameter Groupsをmysql5-5-for-triggerに変更
  • Reboot
@jfloff
jfloff / mamp.md
Last active August 20, 2024 12:46
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you:

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@xeoncross
xeoncross / index.php
Created March 8, 2012 17:31
Tiny, SMTP client in PHP
<?php
/*
This is a very tiny proof-of-concept SMTP client. Currently it's over 320 characters (if the var names are compressed). Think you can build one smaller?
*/
ini_set('default_socket_timeout', 3);
$user = '[email protected]';
$pass = '';
$host = 'ssl://smtp.gmail.com';
@jaydson
jaydson / gist:1780598
Created February 9, 2012 15:11
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){