Skip to content

Instantly share code, notes, and snippets.

View mustafakibar's full-sized avatar
:octocat:
kibar

kibar mustafakibar

:octocat:
kibar
View GitHub Profile
@mbonaci
mbonaci / gist:e92a2bc690e002f461c1
Created February 28, 2015 14:16
log4j.properties: ERRORs to the console, INFO to a file (Spark)
# Set everything to be logged to the console
log4j.rootCategory=INFO, console, file
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.target=System.err
log4j.appender.console.threshold=ERROR
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
log4j.appender.file=org.apache.log4j.RollingFileAppender
@jhorsman
jhorsman / logback.xml
Last active March 19, 2018 13:16
SDL Tridion Content Delivery logging configuration.
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<!-- Properties -->
<property name="log.pattern" value="%date %-5level %logger{0} - %message%n"/>
<property name="log.history" value="7"/>
<property name="log.folder" value="/home/user/log"/>
<property name="log.level" value="INFO"/>
<!-- Appenders -->
<appender name="rollingTransportLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
@jsumners
jsumners / logback.xml
Last active March 19, 2018 18:32
A basic Logback configuration template for use in an IntelliJ IDEA file template. Very easily used as a generic template as well.
<configuration scan="true" scanPeriod="1 minute">
<variable
name="logPattern"
value="%-30(%d{MMM dd YYYY HH:mm:ss.SSS} [%thread]) %-5level %logger{5} [%file:%line] - %msg%n" />
<!--
The base name of the log file. For "example.log" this would
simply be "example". Or if it were "logs/example.log" then
"logs/example".
@mlagerberg
mlagerberg / adbtextinput-extended.bat
Last active April 26, 2018 17:47
[Android text input from your PC] #android #adb
@echo off
cls
echo.
echo Enter text and hit enter to send text
echo input to your phone or emulator.
echo Note: having adb in your path is required.
echo.
echo Type /help for a list of available commands,
echo /quit or Ctrl+C to quit.
echo.
@SzymonGrochowiak
SzymonGrochowiak / turn_off_airplane_mode.bat
Created November 14, 2017 17:02
Turn on/off airplane mode
adb shell settings put global airplane_mode_on 0 & adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
@echo off &setlocal enabledelayedexpansion
::set your port
set PORT_BASE=5555
::list the device
adb devices |findstr /i "\<device\>" >nul
if "%errorlevel%" neq "0" (
echo "device not found."
goto :eof
)
::set devices serial
@opatut
opatut / love-android-package
Created February 18, 2014 21:31
Android Löve2D debugging helper
#!/bin/bash
GAME=$1
DIR="/sdcard/love"
MIME="application/x-love-game"
INTENT="org.love2d.android/.GameActivity"
if [[ -z "$1" ]]; then
GAME="game.love"
echo "Creating game package at $GAME"
@thefrench77
thefrench77 / adb_displayinfo.sh
Last active April 26, 2018 19:27
Dump Android display info
#!/usr/bin/zsh
adb shell dumpsys display | grep mBaseDisplayInfo
@echo off
set "ip="
for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "Default"') do if not defined ip set ip=%%b
echo %ip%
adb tcpip 5555
adb connect %ip%
adb devices
@ThatCheck
ThatCheck / webstorm-eslint-fix
Created January 11, 2016 16:40
Add command to run eslint --fix on webstorm (or any jetbrains IDE like phpStorm)
parameter:
--fix "$FilePath$"
Working Directory:
$ProjectFileDir$
To configure go to : File => Settings => Tools => External Tools