Skip to content

Instantly share code, notes, and snippets.

View serebano's full-sized avatar

Sergiu Toderascu serebano

View GitHub Profile
@serebano
serebano / jquery_intro.js
Created October 5, 2011 22:48
jQuery animate login intro
$(document).ready(function(){
$("#intro_logo").animate({'opacity':'0'},3000, function(){
$("#login_form").fadeIn();
});
});
@serebano
serebano / gist:3034898
Created July 2, 2012 18:54
CI country helper & array
<?php
function country_dropdown ( $name="country", $top_countries=array(), $selection=NULL, $show_all=TRUE ) {
// You may want to pull this from an array within the helper
$countries = config_item('countries');
$html = "<select name='{$name}' id='{$name}'>";
$selected = NULL;
if(in_array($selection,$top_countries)) {
$top_selection = $selection;
$all_selection = NULL;
._css_videos {
background: #0000FF;
color: #fff;
}
._css_videos a {
color: #aaa;
font-size: 24px;
}
@media print {
* {
color: #000 !important;
text-shadow: none !important;
background: transparent !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
@serebano
serebano / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../code-mirror/code-mirror.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@serebano
serebano / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1AppScaffold.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1PageContainer.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationStageLeft.html">
<link rel="import" href="../../salesforce/s1-elements/s1StagedNavigationNotifications.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorLightDefault.html">
<link rel="import" href="../../salesforce/s1-elements/s1ListWithLabels.html">
<link rel="import" href="../../salesforce/s1-elements/s1AnchorDark.html">
<link rel="import" href="../../salesforce/s1-elements/s1IndicatorDotsLightBackground.html">
<link rel="import" href="../../salesforce/s1-elements/s1ButtonGroups.html">
<link rel="import" href="../../salesforce/s1-elements/scaffold/s1DetailView.html">
@serebano
serebano / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@serebano
serebano / gist:ec10d318c5482dfe6097
Created February 28, 2015 00:11
shell script to get ip
export DEBIAN_FRONTEND=noninteractive
HOST="google.com"
SELF_IP=$(ifconfig | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");print _[1]}')
REMOTE_IP=$(python -c "import socket; print socket.gethostbyname('${HOST}')")
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@serebano
serebano / hi.js
Last active December 30, 2015 10:01
hi!box
<hi(props, name) export>
<h1 => 'Hello ', this.name || String(name)
<input on-input=(e => this.pub('name', e.target.value)) />
<style +scoped>
:scope {
display: block;
font-family: Helvetica Neue;
font-size: 16px;
color: ${ box.color(props.color) };
}