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
# automatically set user and group in new files on this folder and nested folders. | |
find `pwd` -type d -exec chmod ug+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
<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>'; | |
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
#!/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)) |
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
<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 */ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
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(); |
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 | |
components" => [ | |
"log" => [ | |
"class" => "CLogRouter", | |
"routes" => [ | |
[ | |
"class" => "CFileLogRoute", | |
"levels" => "error, warning, notice", | |
"LogFile" => "yii_error.log", | |
"maxFileSize" => 102400, |
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
(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/ |
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
;; 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 |