This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Path\To\Behaviors; | |
use System\Classes\ModelBehavior; | |
/** | |
* Model behavior that allows to store some model's attributes | |
* in json format in grouping fields in db. | |
* | |
* USAGE: In your model add | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def moduleinit(): | |
"""Make sure various environment variables are set correctly | |
""" | |
if 'MODULE_VERSION' not in os.environ: | |
os.environ['MODULE_VERSION_STACK'] = '3.2.10' | |
os.environ['MODULE_VERSION'] = '3.2.10' | |
else: | |
os.environ['MODULE_VERSION_STACK'] = os.environ['MODULE_VERSION'] | |
os.environ['MODULESHOME'] = '/usr/share/Modules/3.2.10' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAGRANTFILE_API_VERSION = "2" | |
path = "#{File.dirname(__FILE__)}" | |
require 'yaml' | |
require path + '/scripts/homestead.rb' | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
Homestead.configure(config, YAML::load(File.read(path + '/Homestead.yaml')), Vagrant.has_plugin?('vagrant-hostsupdater')) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.contrib.flatpages.models import FlatPage | |
# Note: we are renaming the original Admin and Form as we import them! | |
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld | |
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld | |
from django import forms | |
from ckeditor.widgets import CKEditorWidget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.contrib.flatpages.models import FlatPage | |
# Note: we are renaming the original Admin and Form as we import them! | |
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld | |
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld | |
from django import forms | |
from ckeditor.widgets import CKEditorWidget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bits = eval("0x" + [0.15625].pack('g').unpack('H16')[0]).to_s(2).rjust(32,"0") | |
#=> "00111110001000000000000000000000" | |
# these are the bits of 0.15625 represented as a single precision float | |
sign = bits[0] | |
#=> "0" | |
exponent = bits[1..8] | |
#=> "01111100" | |
mantissa = bits[9..32] | |
#=> "01000000000000000000000" | |
sign = sign.to_i == 0 ? 1 : -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "bersam", | |
"homepage": "http://bersam.org", | |
"authors": [ | |
"Bersam Karbasion <[email protected]>" | |
], | |
"license": "MIT", | |
"private": true, | |
"dependencies": { | |
"modernizr": "2.8.2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SmoothScroll for websites v1.2.1 | |
// Licensed under the terms of the MIT license. | |
// | |
// You may use it in your theme if you credit me. | |
// It is also free to use on any individual website. | |
// | |
// Exception: | |
// The only restriction would be not to publish any | |
// extension for browsers or native application |