Skip to content

Instantly share code, notes, and snippets.

View subashz's full-sized avatar
🏠
Working from home

Subash subashz

🏠
Working from home
View GitHub Profile
@subashz
subashz / test.php
Created July 19, 2017 16:26
Number of way to save form request in laravel
public function store(Request $request) {
$post = new Post;
$post->name=$request->name;
$post->title = $request->title;
$post->tag = $request->tag;
$post->save();
}
//using request helper method
public function store() {
@subashz
subashz / rebootrouter
Last active October 10, 2017 07:04
Bash Script to reboot the router through telnet
#!/usr/bin/expect
# run script by installing expect
# chmod +x rebootrouter
# ./rebootrouter 192.168.0.1 admin password
#script will timeout after 20 seconds.
set timeout 20
set host [lindex $argv 1]
set user [lindex $argv 2]
@subashz
subashz / Glow XML Android Layout
Created June 22, 2018 08:08
Glow XML Android Layout
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:startColor="#fff"
android:endColor="#fff"
android:centerColor="@color/transparent"
android:type="linear"/>
</shape>
destroy_build_var_cache:unset:5: var_cache_ ANDROID_BUILD_PATHS OUT_DIR print report_config TARGET_ARCH TARGET_BUILD_VARIANT TARGET_DEVICE TARGET_GCC_VERSION
TARGET_PLATFORM_VERSION TARGET_PRODUCT TARGET_2ND_ARCH 2ND_TARGET_GCC_VERSION : invalid parameter name
: ZSH seems to be causing the problem, switch to bash