Skip to content

Instantly share code, notes, and snippets.

View envex's full-sized avatar
💀

Matt Vickers envex

💀
View GitHub Profile
@cowboy
cowboy / #bf4-emblem-import-export.md
Last active December 3, 2023 17:43
JavaScript: BF4 Battlelog Emblem Import / Export

Exporting an emblem

  1. Log into BF4 Battlelog.
  2. Visit the Customize emblem page.
  3. Select the emblem you wish to export.
  4. Open the console (Ctrl-Shift-J).
  5. Enter the following code snippet to copy the raw emblem data to the clipboard:
    copy('emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');');
  6. Paste somewhere useful, like a gist. Whatever.
  7. Close the console (Ctrl-Shift-J).
@envex
envex / setup_project.sh
Created November 1, 2012 02:52
Setup a new project for Git pushes to an FTP server
#!/bin/bash
# Creates a new project folder on the server,
# creates a new git repo, adds our post-receive
# hook and add a value to the config
cd ~/
echo "
What's the new projects path?"
@envex
envex / post-receive
Created June 13, 2012 20:33
Post Receive hook for using git & ssh to upload files to a server
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'