Skip to content

Instantly share code, notes, and snippets.

View jamelt's full-sized avatar

Jamel Toms jamelt

View GitHub Profile
@ancillaryfactory
ancillaryfactory / .gitignore
Created March 7, 2012 01:24 — forked from redoPop/.gitignore
Wordpress: Template .gitignore file
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@davidcelis
davidcelis / nginx.conf
Last active June 15, 2018 13:11
Nginx configuration to redirect HTTP traffic to HTTPS (Puma)
upstream puma {
server unix:///var/www/app/shared/tmp/sockets/puma.sock fail_timeout=0;
}
server {
listen 80 default deferred;
server_name example.com;
rewrite ^/(.+) https://example.com/$1 permanent;
}
@goyalankit
goyalankit / bash_to_zsh_history.rb
Last active October 28, 2023 05:07
Import bash history to zsh history.
#################################################################
# = This script transfers bash history to zsh history
# = Change bash and zsh history files, if you don't use defaults
#
# = Usage: ruby bash_to_zsh_history.rb
#
# = Author: Ankit Goyal
#################################################################
# change if you don't use default values
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm"
sudo yum -y localinstall jdk-*.rpm
rm -fR jdk-*.rpm
/usr/sbin/alternatives --config java
# install JCE 8
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip"
unzip jce_policy-8.zip
mv /usr/java/default/jre/lib/security/local_policy.jar /usr/java/default/jre/lib/security/local_policy.jar.backup
@maxivak
maxivak / __readme.md
Last active February 22, 2024 11:55
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@generatepress
generatepress / gist:ceba614f8fbaf1b433fc947190ba5841
Last active April 14, 2020 07:05
Highlight the current menu item for one page site and sticky navigation
<script type="text/javascript">
(function($) {
$(document).ready(function() {
var navChildren = $("#primary-menu li").children();
var aArray = [];
for (var i = 0; i < navChildren.length; i++) {
var aChild = navChildren[i];
var ahref = $(aChild).attr('href');
aArray.push(ahref);
}
@numinit
numinit / 0-index.md
Last active April 6, 2024 21:54
patch -p0 < fix-vega-reset.patch