This file contains hidden or 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
/* Absolute Center CSS Spinner */ | |
.loading { | |
position: fixed; | |
z-index: 999; | |
height: 2em; | |
width: 2em; | |
overflow: show; | |
margin: auto; | |
top: 0; | |
left: 0; |
This file contains hidden or 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
To fix, open your script with vi or vim and enter in vi command mode (key ESC), then type this: | |
:set fileformat=unix | |
Finally save it | |
:x! or :wq! |
This file contains hidden or 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
/* credits: https://coderwall.com/p/8pklhg, by Ceane Lamerez - http://ceanelamerez.com */ | |
/* example.json */ | |
// { | |
// "key": "value", | |
// "greetings": "Hello World!" | |
// } | |
package main |
This file contains hidden or 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
lyon:magento_dev Lyon$ phpmamp -i | |
phpinfo() | |
PHP Version => 5.5.10 | |
System => Darwin lyon.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 | |
Build Date => Mar 18 2014 18:10:04 | |
Configure Command => './configure' '--with-mysql=/Applications/MAMP/Library' '--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library' '--with-png-dir=/Applications/MAMP/Library' '--with-zlib' '--with-zlib-dir=/Applications/MAMP/Library' '--with-freetype-dir=/Applications/MAMP/Library' '--prefix=/Applications/MAMP/bin/php/php5.5.10' '--exec-prefix=/Applications/MAMP/bin/php/php5.5.10' '--sysconfdir=/Applications/MAMP/bin/php/php5.5.10/conf' '--with-config-file-path=/Applications/MAMP/bin/php/php5.5.10/conf' '--enable-ftp' '--enable-gd-native-ttf' '--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config' '--with-t1lib=/Applications/MAMP/Library' '--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-sockets' '--enable-b |
This file contains hidden or 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 | |
// Credits: | |
// http://stackoverflow.com/questions/3004041/how-to-replace-a-particular-line-in-a-text-file-using-php | |
// http://stackoverflow.com/users/91914/gnarf | |
// One approach that you can use on smaller files that can fit into your memory twice: | |
$data = file('myfile'); // reads an array of lines | |
function replace_a_line($data) { |
This file contains hidden or 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
schtasks /create /tn "MyAppDailyUpdate" /tr "powershell -ExecutionPolicy unrestricted -Command \"(New-Object Net.WebClient).DownloadString(\\\"http://localhost/cron.aspx\\\")\"" /sc DAILY /ru System |
This file contains hidden or 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
$('#preview').bind('click', function(e) { | |
var minimum = parseInt($('#minimum').val()); | |
var maximum = parseInt($('#maximum').val()); | |
var interval = parseInt($('#interval').val()); | |
var times = Math.floor(maximum/interval); | |
var html = ''; | |
for (var i = 0; i < times; i++) { |
This file contains hidden or 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
<select id="mySelect" multiple="multiple"> | |
<option value="1">First</option> | |
<option value="2">Second</option> | |
<option value="3">Third</option> | |
<option value="4">Fourth</option> | |
</select> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
if (!$("#mySelect option:selected").length) |