Skip to content

Instantly share code, notes, and snippets.

View ozknozsrt's full-sized avatar
🚀
Focusing

Özkan ÖZSERT ozknozsrt

🚀
Focusing
View GitHub Profile
@kopiro
kopiro / set-cookie-good.php
Created August 26, 2011 13:38
Set cookie for all pages PHP
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@jareware
jareware / SCSS.md
Last active April 23, 2024 22:13
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@zamozniewicz
zamozniewicz / front-end-blogs.md
Last active July 30, 2019 03:36
Front-end blogs worth reading

##Front-end blogs worth reading##

Even though for the last few years blogs have been losing popularity to Twitter, Facebook and Google Plus and so on, they're still not dead and have not been replaced with other media.

###Articles, showcases, resources###

  • A List Apart - articles design, development, and web standards
  • DailyJS - news, tips, examples and reviews of a variety of JavaScript frameworks and modules.
  • Mozilla Hacks - one of key resources for people developing for the Open Web
@garystorey
garystorey / pxtorem.scss
Last active November 9, 2023 16:34
Sass to convert px to rem
/**
* Convert font-size from px to rem with px fallback
*
* @param $size - the value in pixel you want to convert
*
* e.g. p {@include fontSize(12px);}
*
*/
@use "sass:math";
@zefanja
zefanja / index.html
Last active June 8, 2019 19:33
My two files for my little robot project
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Robot Project</title>
<script src="/socket.io/socket.io.js"></script>
<script>
//Damit lesen wir den Gyroskopen aus
window.addEventListener("deviceorientation", handleOrientation, true);
@twoblokeswithapostie
twoblokeswithapostie / gist:9359477
Created March 5, 2014 01:29
Code using Momentjs for finding, today, this weekend, this months and next month to and from dates
// JavaScript code that finds dates for today, this weekend, this month, next month
// This weekend = next Sat and Sun
// This month = today to end of this month
// Next month = 1st of next month = end of next month
// Useful on Business Catalyst web app search form for searching from-to dates
// Requires jquery and moment.js
$(document).ready(function(){
$('#today_nav').on("click", function(){
@iamgaby7521
iamgaby7521 / random-class.js
Last active May 2, 2020 19:12
add random classes - js
(function($){
$(document).ready(function() {
var classes = [ 'style1', 'style2', 'style3' ]; // the classes you want to add
$('.item').each(function(i) { // the element(s) you want to add the class to.
$(this).addClass(classes[ Math.floor( Math.random()*classes.length ) ] );
});
});
})(jQuery);
@davidsneal
davidsneal / html-share-buttons.html
Last active December 12, 2023 13:18
HTML Share Buttons
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
@cferdinandi
cferdinandi / umd-script-boilerplate.js
Last active December 10, 2023 10:23
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {