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
#!/bin/bash | |
# Sync directory between client and SSH server | |
usr='VOSTRO_UTENTE_SUL_SERVER_SHH' | |
srv='SSH_SERVER' | |
rdir='~/remote/directory/to/sync' | |
ldir='~/local/directory/to/sync/' #use the / at the end to do not sync the same folder, but only files in the directory | |
slp='30' # timeout between each request, in seconds | |
while (true) do |
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
MessagingManager.getState().enterForwardMode(); | |
var allMsg = $$(".MessagingMessage"); | |
var evtClk = document.createEvent("HTMLEvents"); | |
evtClk.initEvent("click", true, true); | |
for (var i=0; i<allMsg.length; i++) | |
allMsg[i].dispatchEvent(evtClk); | |
$$("#ForwardMessages input")[0].click(); |
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 | |
define( '_JEXEC', 1 ); | |
define( '_VALID_MOS', 1 ); | |
define( 'JPATH_BASE', realpath('.')); | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); | |
$mainframe =& JFactory::getApplication('site'); | |
$mainframe->initialise(); | |
?> |
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
.gist { | |
color: #fff !important; | |
background: #fff !important; | |
padding: 3px !important; | |
border: 1px solid #888 !important; | |
overflow: auto !important; | |
} | |
.gist .gist-file { | |
border: none !important; | |
margin-bottom: 0 !important; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
long sumod(long x) { | |
long i, s = 1; | |
for (i=2; i<=(x/2); i++) | |
if ((int)x%i==0) | |
s += i; | |
return s; |
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
setThumbImage = function(e, src) { | |
var img = new Image(); | |
img.src = src; | |
img.onload = function() { | |
console.log("img loaded"); | |
e.style.backgroundImage = 'url('+src+')'; | |
e.style.backgroundPosition = 'center'; | |
e.style.backgroundRepeat = 'no-repeat'; | |
e.style.backgroundSize = (img.width>img.height ? 'auto 100%' : '100% auto'); | |
} |
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
javascript: | |
var friends = {}; | |
var bfriends = []; | |
var char = 97; | |
if (!q) var q = document.querySelector("#q"); | |
q.style.color="white"; | |
go = function(){ | |
q.blur(); | |
var charS = String.fromCharCode(char); | |
char++; |
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 | |
$q = $_GET["q"]; | |
if (!$q) $q = $_GET["search"]; | |
$q = str_replace(" ", "_", ucwords($q)); | |
if (!$q) { | |
header("location: index.php?q=Wikipedia"); | |
die(); | |
} | |
if (file_exists("./cache/$q.html")) { | |
echo file_get_contents("./cache/$q.html"); |
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
javascript: | |
ytAlert = function() | |
{ | |
console.log("Alert!"); | |
window.open("http://www.youtube.com/watch?v=xRrfg_uAzwg&feature=grec_index"); | |
} | |
onlineString = function(b) | |
{ |