Skip to content

Instantly share code, notes, and snippets.

View setkyar's full-sized avatar
🧘‍♂️

Set Kyar Wa Lar (Universe) setkyar

🧘‍♂️
View GitHub Profile
@setkyar
setkyar / variable_in_blade.php
Created October 22, 2014 05:13
Assign variable in Laravel
{{ ''; $your_variable_name = 'Your Variable Value'; }}
@setkyar
setkyar / 0_reuse_code.js
Created August 7, 2014 08:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@setkyar
setkyar / JS Date Notes
Last active August 29, 2015 14:04
JavaScript Date Notes
## [To get first and last day of the month in js](http://stackoverflow.com/questions/13571700/get-first-and-last-date-of-current-month-with-javascript-or-jquery)
var date = new Date();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
## For Month Select
function dateDropdown(select) {
@setkyar
setkyar / add-new-row-with-dynamic-row
Last active August 29, 2015 14:04
Add New Row with Dynamic name
<!-- First Create a Template to append -->
<script type="text/plain" id="row_template" >
<tr>
<td><input type="text" Placeholder="Simple" data-property="first_simple"></td>
<td><input type="text" Placeholder="Simple" data-property="second_simple"></td>
<td><input type="text" Placeholder="Simple" data-property="third_simple"></td>
</tr>
</script>
@setkyar
setkyar / html-option-loop
Last active August 29, 2015 14:04
Looping For Option
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
var select = document.getElementById("demo");
var i=0;
for(i=1;i<=5;i++){
@setkyar
setkyar / install.ssh
Created May 22, 2014 10:24
My Vagrant-Setup ssh
#!/usr/bin/env bash
echo "--- Hello, master. Let's get to work. Installing now. ---"
echo "--- Updating packages list ---"
sudo apt-get update
echo "--- MySQL time ---"
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'