This file contains 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
#!/bin/bash | |
## The post install script for Ubuntu 14.04 LTS | |
## @author Carlo Micieli | |
## @version 5.0.5 | |
## Constants | |
NONE='\e[39m' | |
RED='\e[31m' | |
GREEN='\e[32m' | |
CYAN='\e[36m' |
This file contains 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
## Making a 32 bit version of Homestead | |
# Clone the settler repository to a directory | |
git clone https://github.com/laravel/settler.git Ubuntu32 | |
# In that directory edit the file called "Vagrantfile" to use a ubuntu 32 box instead of the 64 bit one | |
change this line: | |
config.vm.box = "ubuntu/trusty64" |
This file contains 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 | |
<div class="usr_content"> | |
<ul> | |
// list item to reload | |
<li class="disabled success" id="reload">Online Users | |
<?php | |
$onlineUsers = $demo->getOnlineUsers($current_user, $user_company); | |
foreach ($onlineUsers as $key => $onlineUser) { | |
if (is_array($onlineUser)){ |
This file contains 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
<form> | |
<textarea></textarea> | |
<input type="submit" value="Submit"/> | |
</form> | |
<script> | |
$("textarea").keyup(function(event){ | |
if(event.keyCode == 13){ | |
$("form").submit(); | |
} |
This file contains 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
<html> | |
<head> | |
<link href="https://rawgithub.com/hayageek/jquery-upload-file/master/css/uploadfile.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="https://rawgithub.com/hayageek/jquery-upload-file/master/js/jquery.uploadfile.min.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<form action="" class="form"> | |
<textarea class="form-contol" contenteditable data-emojiable="true" placeholder="Type a message here" |
This file contains 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
{ | |
"additional_path_items": | |
[ | |
"/usr/local/php5/bin/" | |
], | |
"auto_complete_selector": "source, text", | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"font_face": "Fira Code", | |
"font_options": |
This file contains 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
npm install gulp-concat gulp-uglify gulp-strip-debug gulp-autoprefixer gulp-minify-css gulp-changed gulp-imagemin gulp-jshint --save-dev | |
// include gulp | |
var gulp = require('gulp'); | |
//jshint | |
var jshint = require('gulp-jshint'); | |
var changed = require('gulp-changed'); | |
//imgs | |
var imagemin = require('gulp-imagemin'); | |
var minifyHTML = require('gulp-minify-html'); |
This file contains 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
# | |
# mpv configuration file | |
# | |
# Configuration files are read system-wide from /usr/local/etc/mpv.conf | |
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override | |
# system-wide settings, all of which are overridden by the command line. | |
deband=no | |
geometry=50%:50% | |
alang=en |
This file contains 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
# 100th birthday | |
def task1(): | |
name = str(input("Enter your name: ")) | |
age = int(input("Enter your age: ")) | |
yearsToHundred = (100 - age) + 2017 |
This file contains 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 | |
/* | |
Challenge #1: | |
Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements. | |
moveZeros([false, 1, 0, 1, 2, 0, 1, 3, "a"]) | |
// returns [false, 1, 1, 2, 1, 3, "a", 0, 0] |
OlderNewer