This file contains 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
#!/bin/sh | |
# | |
# This hook is placed in Bare repository and it updates Working tree whenever a PUSH | |
# is executed | |
# | |
# Assuming following file structure: | |
# . | |
# |-- myproject | |
# |-- myproject.git | |
# set WORKTREE=../myproject |
This file contains 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
/** | |
* Slanted tabs with CSS 3D transforms | |
* See http://lea.verou.me/2013/10/slanted-tabs-with-css-3d-transforms/ | |
*/ | |
body { padding: 50px; } | |
nav { | |
position: relative; | |
z-index: 1; |
This file contains 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
inline int FastFtol(const float a) | |
{ | |
static int b; | |
#if defined(_MSVC) | |
__asm fld a | |
__asm fistp b | |
#elif defined(__GNUG__) | |
// use AT&T inline assembly style, document that |
This file contains 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
for i in `seq 1 1000`; do | |
mkdir -p files-$i; | |
for j in `seq 1 100`; do | |
dd if=/dev/zero of=files-$i/$j bs=100k count=1 2> /dev/null; | |
done; | |
done |
This file contains 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
var urlFotoAnterior = ""; | |
var interval = setInterval(function (){ | |
try { | |
var urlFotoActual = document.getElementById("photo_image").getAttribute("src"); | |
if (urlFotoActual != urlFotoAnterior) | |
{ | |
urlFotoAnterior = urlFotoActual; | |
document.getElementById("photo-actions-remove").click(); |
This file contains 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
var urlFotoAnterior = ""; | |
var interval = setInterval(function() { | |
try { | |
var urlFotoActual = document.getElementById("photo_image").getAttribute("src"); | |
if (urlFotoActual != urlFotoAnterior) | |
{ | |
urlFotoAnterior = urlFotoActual; | |
document.querySelector("#edit_tag_list .js-deleteTag .avatar").click(); |
This file contains 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
// without lookup table | |
function getMonthDays_A (month, year) | |
{ | |
if (month === 1) | |
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0) ? 29 : 28; | |
if (month % 2) | |
return month > 6 ? 31 : 30; | |
return month > 6 ? 30 : 31; |
This file contains 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
var intervalo = null; | |
function DeleteCommentInterval() | |
{ | |
try { | |
var coment = document.querySelector("#wallpost-list .itm-actions-trans button.action") | |
if (coment == null) | |
{ |
This file contains 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
var elementoFoto = null, urlFotoActual = "", urlFotoAnterior = "", intervalo = null, fechaAnt = '', dCont = 0; | |
function intervalDescargarFoto() | |
{ | |
try { | |
elementoFoto = document.getElementById("photo_image"); | |
urlFotoActual = elementoFoto.getAttribute("src"); | |
if (urlFotoActual != urlFotoAnterior) | |
return; |
This file contains 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
#include <stdlib.h> | |
#include <string.h> | |
#include <wchar.h> | |
static char* utf16_to_utf8 (const wchar_t *src) | |
{ | |
size_t len = wcslen(src), si, di; | |
char *dst = (char*)malloc(sizeof(*dst)*(3*len+1)); |