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
Неделя 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 / 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();
};
@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 / table-autowidth.css
Created January 7, 2016 05:21
Table auto-width
td {
white-space: nowrap;
}
@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 / highlight-checked-input.css
Created January 7, 2016 05:23
Highlight checked input
input:checked + label{
background: yellow;
}
@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 / 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 / media.css
Created January 7, 2016 05:27
Hardboiled CSS3 Media Queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@mugukamil
mugukamil / bg-transparency.css
Created January 7, 2016 05:28
Background transparency Being able to set the transparency of the background without affecting the transparency of the foreground (the text) is quite handy. That’s why there’s rgba() in CSS (red, green, blue, alpha). IE is not yet supporting it, but we can use the gradient filter which does support transparency. In this case we don’t need the ac…
.rgba {
background-color: transparent;
background-color: rgba(200,200,200,0.8);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99dddddd,endColorstr=#99dddddd);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99dddddd,endColorstr=#99dddddd)";
}