Skip to content

Instantly share code, notes, and snippets.

@taclab
taclab / exec_cron2.php
Created November 24, 2010 14:04
crontab
<?php
//! Query
$time = "*/15 * * * * /usr/bin/php -f /home/taclab/public_html/fbapi/fb/test_cron.php > /home/taclab/public_html/fbapi/fb/clean_tmp_dir2.log";
//! Write Cront2.cron
$fichier = "cront2.cron";
$fil = fopen($fichier,'a');
fputs($fil,$time."\n");
// Execute
@taclab
taclab / index.html
Created November 25, 2011 10:14 — forked from mbostock/.block
Polymaps + D3, Part 2
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.5"></script>
<script type="text/javascript" src="http://polymaps.org/polymaps.min.js?2.5.0"></script>
<style type="text/css">
@import url("http://polymaps.org/style.css");
html, body {
@taclab
taclab / index.html
Created December 6, 2011 17:14 — forked from mbostock/README.md
Histogram (D3)
<!DOCTYPE html>
<html>
<head>
<title>Histogram</title>
<script type="text/javascript" src="https://github.com/mbostock/d3/raw/v1.17.0/d3.js"></script>
<script type="text/javascript" src="https://github.com/mbostock/d3/raw/v1.17.0/d3.layout.js"></script>
<style type="text/css">
body {
font: 10px sans-serif;
@taclab
taclab / build.xml
Created September 19, 2012 14:59
Buil XML for ANT APACHE
<?xml version="1.0" encoding="utf-8"?>
<project name="tutorialProject" default="prod" basedir=".">
<description>Client-side ANT build file example</description>
<target name="-load.properties"
description="Set properties for this build">
<!--Google Compiler location-->
<property name="gcomp.dir" value="${basedir}/shared/bin/google-compiler.jar"/>
<!--Source JS dir-->
@taclab
taclab / gist:3829369
Created October 3, 2012 19:46
Burn ISO file on a USB Drive on Mac OSx
Download the desired file
Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
Note: OS X tends to put the .dmg ending on the output file automatically. Remove the .dmg extension as necessary, mv ~/path/to/target.img{.dmg,}
Run diskutil list to get the current list of devices
Insert your flash media
Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
Using /dev/rdisk instead of /dev/disk may be faster.
@taclab
taclab / bootstrap_custom_Col
Created March 2, 2013 20:18
Bootstrap - 16 Col & 24 Col This method for last version of Bootstrap - Version 2.3.1 Click this link to customize bootstrap: http://twitter.github.com/bootstrap/customize.html
16 Grid system with Gutter
@gridColumns: 16
@gridColumnWidth: 45px
@gridGutterWidth: 15px
@gridColumnWidth1200: 52.5px
@gridGutterWidth1200: 22.5px
@gridColumnWidth768: 31.5px
@gridGutterWidth768: 15px
16 Grid system without Gutter
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<title></title>
<!-- iPhone -->
<link href="http://taylor.fausak.me/static/images/apple-touch-icon-57x57.png"
@keyframes crt-on {
0% {
opacity: 0.0;
transform: scale(0.5, 0.005);
box-shadow: inset 0 9999px 0 rgba(255,255,255,1.0);
}
40% {
opacity: 1.0;
}
70% {
You've asked a lot of questions in one, but I'll help you with as many of them as I can.
First, you need to add your IRC server of choice - fire up irssi, and type the following:
/server add -auto -network Freenode irc.freenode.net 6667
That will add the Freenode IRC network to your IRSSI config, and will automatically connect when you run irssi.
/network add -nick <your-nick> Freenode
@taclab
taclab / layerToGeometry
Created May 31, 2013 13:50
layer To Geometry - leaflet
var layerToGeometry = function(layer) {
var json, type, latlng, latlngs = [], i;
if (L.Marker && (layer instanceof L.Marker)) {
type = 'Point';
latlng = LatLngToCoords(layer._latlng);
return JSON.stringify({"type": type, "coordinates": latlng});
} else if (L.Polygon && (layer instanceof L.Polygon)) {
type = 'Polygon';