Skip to content

Instantly share code, notes, and snippets.

View limarc's full-sized avatar
🚀

Alex Lobashev limarc

🚀
  • Cyprus, Limassol
View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 16, 2025 11:36
A badass list of frontend development resources I collected over time.
@adammw
adammw / content_script.js
Created June 19, 2013 10:27
Chrome Extension for Debugging Secure Websockets on Spotify Web Player. Clone the repo, install extension as unpacked then navigate to `https://play.spotify.com/?ap=wss://ash1-linkap-a1.ap.spotify.com:443`
(function debugify_content_script(){
console.log('debugify content script running');
var nativeWebSocket = window.WebSocket;
var requests = window.requestLog = {};
var WebSocket = window.WebSocket = function(uri) {
console.log('new WebSocket created', uri);
this.websocket = new nativeWebSocket(uri);
this.websocket.onopen = this.onOpen.bind(this);
this.websocket.onmessage = this.onMessage.bind(this);
this.listeners = {onmessage: null, onopen: null};
@andrewlaskey
andrewlaskey / setAllToMaxHeight.js
Created April 4, 2013 16:40
Set All To Max Height Function
//Paul Irish - http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
@MaskRay
MaskRay / Gruntfile.coffee
Created March 1, 2013 16:17
Gruntfile.coffee
module.exports = (grunt) ->
'use strict'
grunt.initConfig
coffee:
debug:
files: [
expand: true
cwd: 'js'
src: ['**/*.coffee', '!**/_*.coffee']
@sindresorhus
sindresorhus / codestyle.md
Last active September 26, 2023 07:45
My preferred code style.

Code Style

  • Tab indentation
  • Single-quotes
  • Semicolon
  • Strict mode
  • No trailing whitespace
  • Multiple variable statements
  • Space after keywords and between arguments and operators
  • Return early
@jrmoran
jrmoran / app.js
Created October 23, 2012 12:50
AngularJS - basic async request
var App = angular.module('App', []);
App.controller('TodoCtrl', function($scope, $http) {
$http.get('todos.json')
.then(function(res){
$scope.todos = res.data;
});
});
@pazguille
pazguille / exports.js
Last active October 11, 2015 21:38
Exports your library - support AMD / CommonJS
// @see http://addyosmani.com/writing-modular-js/
// library was previously defined
// AMD suppport
if (typeof window.define === 'function' && window.define.amd !== undefined) {
window.define('library', [], function () {
return library;
});
// CommonJS suppport
} else if (typeof module !== 'undefined' && module.exports !== undefined) {
@aral
aral / rem16px.styl
Created July 18, 2012 19:46
Work in progress… mixins for Stylus that handle 16px root em in a way that still gives you pixel parity
// Mixins
// Since some horrible browsers (e.g., on *spit* Android) don’t let you change the
// root em, I’m forced to use the browser default of 16px as the base. This mixin
// will help me keep sane by using units that correspond to pixel units.
line-height(h)
if unit(h) == "rem"
line-height: unit(h, 'px')
line-height: unit(h/16, 'rem')
@voidfiles
voidfiles / subscriber.html
Created June 16, 2012 19:59
Simple Javascript Event Delegation
<html>
<head>
<title>Subscriber Test Page</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css">
<style type="text/css" media="screen">
body {
font-family: Myriad Pro, Helvetica, Arial;
font-size:138.5%;
}
h1 {
@skomaroh
skomaroh / bitrix-disposition-notification.php
Created June 5, 2012 04:56 — forked from kovalev-org/bitrix-disposition-notification.php
Bitrix: EventListener BeforePostingmail
<?
// регистрируем обработчики
AddEventHandler("subscribe", "BeforePostingSendMail", Array("MyClass", "BeforePostingSendMailHandler"));
class MyClass
{
// создаем обработчик события "BeforePostingSendMail"
/* если в теме рассылки будет команда [notify=some@body.ru], то на some@body.ru будет запрошено уведомление о прочтении писем */
function BeforePostingSendMailHandler($arFields)
{