Skip to content

Instantly share code, notes, and snippets.

View JeremyMorgan's full-sized avatar

Jeremy Morgan JeremyMorgan

View GitHub Profile
@mfdj
mfdj / bash_function_mamp_files.sh
Last active August 4, 2020 18:26
Bash function to launch different MAMP Basic configuration files in your prefered text editor
# Usage:
# $ mamp
# $ mamp (apache|vhosts|hosts|php|mysql|a|v|h|p|m)
# $ mamp (error|e)
# $ mamp (error|e) (clear|apache|php|mysql|a|p|m)
# e.g. open php.ini: $ mamp php
# $ mamp p
# e.g. open apache error log: $ mamp error apache
# $ mamp e a
# Uses $EDITOR by default.
@Descalon
Descalon / OneLineFizzBuzz.cs
Last active December 19, 2015 12:19
Nice FizzBuzz one liner.
public class Program {
static void Main(string[] args) {
string s;
for (int i = 1; i < 100; i++) {
s = (i % 15 == 0) ? "FizzBuzz" :(i % 3 == 0) ? "Fizz" : (i % 5 == 0) ? "Buzz" : i.ToString();
System.Console.WriteLine(s); //LOG
}
}
}
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@DannyNunez
DannyNunez / Codeigniter-WebConfig.xml
Created May 1, 2013 16:33
remove index.php from urls in codeigniter
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
@naiquevin
naiquevin / octo2pelican.py
Created February 17, 2013 17:21
A quick script for converting octopress posts (markdown source files) to pelican posts (markdown again but slightly different)
#!/usr/bin/env python
import os
import yaml
import datetime
from collections import OrderedDict
__doc__ = 'A quick script for converting octopress posts (markdown source files) to pelican posts'
@phloe
phloe / Bake Cookies
Last active December 10, 2015 18:49
var bake_cookie = (function () {
function decode (string) {
return decodeURIComponent(
string.replace(/%2[1789A]/gi, function(d){
return String.fromCharCode(parseInt(d.slice(1), 16));
})
);
}
@dazfuller
dazfuller / FizzBuzz.cs
Created December 17, 2012 16:50
Code snippets for C# string reverse blog post
void Main()
{
var printNum = true;
for (var i = 1; i <= 100; i++)
{
if (i % 3 == 0)
{
Console.Write("fizz");
printNum = false;