Skip to content

Instantly share code, notes, and snippets.

View jentanbernardus's full-sized avatar
:shipit:
Coding everyday keeps the doctor away!

Jentan Bernardus jentanbernardus

:shipit:
Coding everyday keeps the doctor away!
View GitHub Profile
@jentanbernardus
jentanbernardus / devices.css
Created October 24, 2012 02:25
Responsive CSS Boilerplate
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-width : 320px) and (max-width : 480px) {
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
@jentanbernardus
jentanbernardus / osx_setup.md
Created September 17, 2019 21:28
Mac OS X setup

Setup Mac OS X

Edit: I've done the same process every couple years since 2013 (Mountain Lion, Mavericks and High Sierra).

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first

@jentanbernardus
jentanbernardus / vhost.md
Last active January 19, 2024 08:40
Setting Up Virtual Hosts in MAMP on Windows

1. Edit MAMP Apache configuration to include Virtual Hosts configuration

In File Explorer, go to C:\MAMP\conf\apache and open httpd.conf with your text editor.

Find this line:

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
@jentanbernardus
jentanbernardus / .htaccess
Created January 24, 2014 03:13
.htaccess Rules for Better Google Page Speed Results - Here's a set of default rules that I add to any site that I want to significantly increase the speed of. It took a lot of weeding through and testing, but this seems to work the best and will (guarantee not included) increase your Google Page Speed score by taking care of a lot of the cache …
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>
@jentanbernardus
jentanbernardus / snippet.php
Last active January 6, 2023 14:18
WordPress: Disable new user and password change notification
<?php
if ( !function_exists('wp_new_user_notification') ) {
function wp_new_user_notification( ) {}
}
if ( !function_exists( 'wp_password_change_notification' ) ) {
function wp_password_change_notification() {}
@jentanbernardus
jentanbernardus / digitalocean.md
Created May 2, 2016 07:43 — forked from stevenchanin/digitalocean.md
Setup instructions for Digital Ocean VPS using Ubuntu and Rails 3.2 #digitalocean #vps #setup

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create Droplet

Create droplet of your liking (ubuntu 12.04 x32) Use an xx.04 LTS version

Setup DNS

On Digital Ocean, create a DNS entry for your server (xyz.com)

Make sure it has NS records that use digital oceans nameservers

@jentanbernardus
jentanbernardus / README.md
Last active March 31, 2021 19:02
Display a WPForm with code #wordpress #code #snippet

Display a WPForm with code

WPForms is usually added to pages using a shortcode like [wpforms id="123"]. But you can also use the following function to add it to your theme. This is useful when you want a contact form to appear in the footer of every page on your site.

wpforms_display( $id, $display_title, $display_description );

@jentanbernardus
jentanbernardus / functions.php
Last active March 24, 2021 20:31
Enable SVG upload in WordPress
<?php
function gimme_svg($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'gimme_svg');
?>
@jentanbernardus
jentanbernardus / index.html
Created March 16, 2021 04:42
Owl Slider 2
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.css">
<!-- Hero Slider -->
<div id="home" class="hero-slider owl-carousel owl-theme">
<div class="single-hs-item item-bg1">
<div class="d-table">
<div class="d-tablecell">
<div class="hero-text">
@jentanbernardus
jentanbernardus / package.json
Last active December 13, 2019 03:54
FreeCodeCamp
{
"name": "freecodecamp",
"author": "Jentan Bernardus",
"description": "A project that does something awesome",
}