Skip to content

Instantly share code, notes, and snippets.

# automatically set user and group in new files on this folder and nested folders.
find `pwd` -type d -exec chmod ug+s '{}' \;
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
$a = array(array('a1' => 5, 'a2' => 6), array('a1' => 2, 'a2' => -1));
echo '<pre>' . var_export($a, true) . '</pre>';
.goldenButton {
-moz-box-shadow:inset 0px 1px 0px 0px #AA8800;
-webkit-box-shadow:inset 0px 1px 0px 0px #AA8800;
box-shadow:inset 0px 1px 0px 0px #AA8800;
border:1px solid #AA8800;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
color:#000000;
text-shadow:0 1px 0 #fceabb;
#!/usr/bin/env lein-exec
;; REPL: run as `lein repl` then `(load-file "detect-repl.clj")`
;; CMD: run as `./detect-repl.clj`
;;
;; Where get lein-exec?
;; `wget https://raw.github.com/kumarshantanu/lein-exec/master/lein-exec`
;; see [clojure shellscripting tutorial](https://raw.github.com/kumarshantanu/lein-exec/master/lein-exec)
(println "1 + 2 =" (+ 1 2))
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
$text = "Hi, my name is ... See my site example.com?test=azaza&ololo=ttt";
/** @see http://stackoverflow.com/a/1188652/1760643 */
@d9k
d9k / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@d9k
d9k / array_replace_recursive_fix.php
Last active August 29, 2015 14:16
array_replace_recursive for php 5.3 and lower
if (!function_exists('array_replace_recursive'))
{
function array_replace_recursive___recurse($array, $array1)
{
foreach ($array1 as $key => $value)
{
// create new key in $array, if it is empty or not an array
if (!isset($array[$key]) || (isset($array[$key]) && !is_array($array[$key])))
{
$array[$key] = array();
<?php
components" => [
"log" => [
"class" => "CLogRouter",
"routes" => [
[
"class" => "CFileLogRoute",
"levels" => "error, warning, notice",
"LogFile" => "yii_error.log",
"maxFileSize" => 102400,
(ns edit-firefox-css.core
(:require [clojure.java.io :as io])
(:gen-class :main true))
(require '[me.raynes.fs :as fs])
(require '[clojure-ini.core :as ini])
(require '[clojure.tools.cli :as cli])
;;(use '[clojure.java.shell :only [sh with-sh-dir]])
;;@link https://codification.wordpress.com/2012/03/06/spawn-an-external-process-in-clojure/
;; original @link https://gist.github.com/codification/1984857
(ns proc
(:import [java.lang ProcessBuilder])
(:use [clojure.java.io :only [reader writer]]))
(defn spawn [& args]
(let [process (-> (ProcessBuilder. args)
(.start))]
{:out (-> process