Skip to content

Instantly share code, notes, and snippets.

View ilyabrin's full-sized avatar
Go, JavaScript

Ilya Brin ilyabrin

Go, JavaScript
View GitHub Profile
@ilyabrin
ilyabrin / ipv4ex01.cpp
Created May 25, 2011 08:50
IPv4 example
/*
Here's a small IPv4 example: it asks for a portbase and a destination and
starts sending packets to that destination.
*/
#include "rtpsession.h"
#include "rtpudpv4transmitter.h"
#include "rtpipv4address.h"
#include "rtpsessionparams.h"
#include "rtperrors.h"
<?php
for ($i=1; $i <= 17441; $i++) {
$html = file_get_contents('http://www.vsmolenske.ru/firma.php?id='.$i);
echo $html;
break;
$Matched = array();
/** создаем новый dom-объект **/
@ilyabrin
ilyabrin / facebook_twitter_login.rb
Created November 7, 2011 09:47
Twitter, Facebook Login in Rails
def facebook_log_in
# Scenarios
# If the user is signed in and has no facebook uid we link the accounts
# If the user is not signed in we create an account for him.
# that's it. he is logged in for life.
if player_signed_in?
if current_player['fb_uid'].nil?
# Link accounts
puts "linking accounts"
/**
* CSS
*/
div {
box-shadow: 1px -1px 10px rgba(0,0,0,.8) inset;
margin: auto;
width: 100px;
height: 120px;
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
/**
* CSS
*/
div {
box-shadow: 1px -1px 10px rgba(0,0,0,.8) inset;
margin: auto;
margin-top: 120px;
width: 100px;
height: 120px;
background: #f06;
@ilyabrin
ilyabrin / dabblet.css
Created December 18, 2011 19:56
CSS Pink Button Transformation v.0.0.1
/**
* CSS Pink Button Transformation v.0.0.1
*/
body {
padding: 20px;
font: 54px/58px Futura, Helvetica, Arial, sans-serif;
color: white;
-webkit-transform: perspective(750);
-webkit-transform-style: preserve-3d;
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@ilyabrin
ilyabrin / magicMethod.php
Created March 28, 2012 00:46
PHP 5.3 :: Magic on the fly
<?php
## PHP :: add new pros an the fly
class magicMethod {
private function magic($name, $value) {
$this->$name = $value;
}
@ilyabrin
ilyabrin / dabblet.css
Created April 24, 2012 00:42 — forked from chriscoyier/dabblet.css
Untitled
body {
font-family: sans-serif;
}
ul {
list-style: none
}
li {
background: slategrey;