Skip to content

Instantly share code, notes, and snippets.

View mugukamil's full-sized avatar
🏠
Working from home

Kamil Mugutdinov mugukamil

🏠
Working from home
View GitHub Profile
@mugukamil
mugukamil / clickable.css
Created January 7, 2016 05:26
Give Clickable Elements a Pointer Cursor Some elements that are clickable mysteriously don’t trigger a pointer cursor in browsers. This fixes that, and provides a default class “pointer” for applying it to other clickable things as needed.
a[href], input[type='submit'], input[type='image'], label[for], select, button, .pointer {
cursor: pointer;
}
@mugukamil
mugukamil / fixed-footer.css
Created January 7, 2016 05:25
CSS Fixed Footer Making your footer sticky with CSS is a must do. You don’t want it to come after the header on small content pages like a kid comes after candy. It is simply wrong.
@mugukamil
mugukamil / highlight-checked-input.css
Created January 7, 2016 05:23
Highlight checked input
input:checked + label{
background: yellow;
}
@mugukamil
mugukamil / css-hacks.css
Created January 7, 2016 05:22
crossbrowser css hacks
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
/* IE7, FF, Saf, Opera */
html>body #tres { color: red }
@mugukamil
mugukamil / table-autowidth.css
Created January 7, 2016 05:21
Table auto-width
td {
white-space: nowrap;
}
@mugukamil
mugukamil / xss-security.html
Created January 5, 2016 14:39
xss security
<SCRIPT>
var pos=document.URL.indexOf("name=")+5;
var name=document.URL.substring(pos,document.URL.length);
if (name.match(/^[a-zA-Z0-9]$/))
{
document.write(name);
}
else
{
window.alert("Security error");
@mugukamil
mugukamil / javascript
Created December 31, 2015 10:48
fbaddfriend
var els=document.querySelectorAll('.FriendRequestAdd');
for(i=0;i<els.length;i++){
if(els[i].innerHTML!="")continue;
els[i].click();
};
Неделя jsunderhood. Все ссылки, которыми я с вами поделился
http://blog.vjeux.com/2014/javascript/react-css-in-js-nationjs.html
http://bost.ocks.org/mike/algorithms/
http://cdn.mozilla.net/pdfjs/tracemonkey.pdf
http://confreaks.tv/videos/keeprubyweird14-opening-keynote
http://confreaks.tv/videos/rubyconf2014-the-social-coding-contract
http://eldar.djafarov.com/2013/11/reactjs-mixing-with-backbone/
http://ember.js/posts/animations-in-emberjs-with-liquidfire
http://frameworksdays.com/event/mk-listochkin-emberjs/participants
@mugukamil
mugukamil / wp helper
Created February 1, 2015 07:24
WordPress Variables, Tags and Functions
Global Variables
Store the data that WP generates
$post
$page
$is_iphone
$wp_version
Template Tags
Most Commonly used functions in theme templates
get_header()
the_title()
// In your mixin file
=retina
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi)
@content
// Call this mixin
.something
+retina
something: something