Skip to content

Instantly share code, notes, and snippets.

View Soulwest's full-sized avatar

Soulwest Soulwest

  • Antalya
View GitHub Profile
@Soulwest
Soulwest / gist:9644fccaeba73ce8cc425c405e250f03
Last active January 16, 2024 07:51
IOS interview questions
@Soulwest
Soulwest / gist:e821d33e1b598cf82a354d4b3fb8b5e2
Created August 30, 2023 10:59
Windows batch rename for CDN
Win+R cmd
cd somethere/
for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")
cmd /e:on /v:on /c "for %f in ("* *.*") do (set "n=%~nxf" & set "n=!n: =_!" & ren "%~ff" "!n!" )"
*.* may be replaced with *.exe
@Soulwest
Soulwest / http.php
Created February 5, 2023 18:18
Code example
<?php
abstract class HTTP extends Kohana_HTTP {
/**
* The standard Kohana_HTTP::redirect raises Out of memory fatal error sometimes
*
* We don't need redirects in HMVC, so we can use the straight-forward approach instead of throwing exception
*/
public static function redirect($uri = '', int $code = 302) : void
xboxdrv --evdev /dev/input/event30 --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_RZ=x2,ABS_Z=y2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --axismap -Y1=Y1,-Y2=Y2 --evdev-keymap BTN_NORTH=x,BTN_WEST=y,BTN_SOUTH=a,BTN_EAST=b,BTN_SELECT=back,BTN_START=start,BTN_TL=lb,BTN_TR=rb,BTN_TL2=lt,BTN_TR2=rt,BTN_THUMBL=tl,BTN_THUMBR=tr --mimic-xpad --silent &
$('h1').each(function(k, v){
var shadows = getComputedStyle(v).textShadow;
console.log(shadows.replaceAll(', rgb', ",\nrgb"))
})
@Soulwest
Soulwest / README.md
Last active April 21, 2024 20:25
POP OS Lenovo legion 5 pro (linux, ubuntu 21.10)
@Soulwest
Soulwest / Kohana.xml
Created August 30, 2018 13:45
Kohana code style
<code_scheme name="Kohana" version="173">
<CssCodeStyleSettings>
<option name="BLANK_LINES_BETWEEN_BLOCKS" value="0" />
</CssCodeStyleSettings>
<HTMLCodeStyleSettings>
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
<option name="HTML_TEXT_WRAP" value="0" />
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings>
@Soulwest
Soulwest / screen.sh
Created July 6, 2018 16:20
Bash screen
screen -dR name
Disconnect: Ctrl+AD
header('Access-Control-Allow-Origin: '.Request::initial()->headers('Origin'));
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
git submodule update --init --recursive