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
>>> | |
def t(*args): | |
return p(*args) | |
>>> | |
def p(*args): | |
i = 0 | |
for arg in args: | |
i += 1 | |
print('i='+str(i)+': '+str(arg)) |
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
# File created by KDE Gtk Config | |
# Configs for GTK2 programs | |
include "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc" | |
style "user-font" | |
{ | |
font_name="Ubuntu Regular" | |
} | |
widget_class "*" style "user-font" | |
gtk-font-name="Ubuntu Regular 12" |
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/python3 | |
# change brightness level on all monitors simultaneously on linux ubuntu | |
import os | |
import re | |
from sys import argv | |
try: | |
brightness_level = float(argv[1]) | |
except IndexError: |
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 | |
updateFieldNames = ['key1', 'key3']; | |
$filteredData = array_intersect_key($data, array_flip($updateFieldNames)); |
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 | |
<?php | |
$shortArrayOnOneString = false; | |
$maxArrayOnOneStringLen = 60; | |
$convertToNumberIfPossible = false; | |
function _arrayLinesToString($lines, $indent){ | |
global $maxArrayOnOneStringLen; | |
global $shortArrayOnOneString; |
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/python3 | |
import argparse | |
import os | |
import pprint | |
import re | |
q = lambda string: '"' + string + '"' | |
pr = lambda obj: pprint.pprint(obj) |
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/python3 | |
import argparse | |
import subprocess | |
import pprint | |
import os.path | |
import configparser | |
home = os.path.expanduser("~") | |
profiles_mozilla_path = home + r"/.mozilla/firefox" |
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 |
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
<?php | |
components" => [ | |
"log" => [ | |
"class" => "CLogRouter", | |
"routes" => [ | |
[ | |
"class" => "CFileLogRoute", | |
"levels" => "error, warning, notice", | |
"LogFile" => "yii_error.log", | |
"maxFileSize" => 102400, |