Skip to content

Instantly share code, notes, and snippets.

View tuxity's full-sized avatar

Kévin tuxity

  • Earth
  • 05:10 (UTC +02:00)
View GitHub Profile
version: '2'
services:
node1:
image: mariadb:10.1
environment:
- TERM=xterm
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_INITDB_SKIP_TZINFO=1
volumes:
- ~/Dev/docker/compose/galera/conf.d:/etc/mysql/conf.d
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@Subv
Subv / gist:3734863
Created September 16, 2012 23:50
Battlegrounds, from @Flemzard
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index cbaab48..490bf07 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -34,13 +34,12 @@
Battlefield::Battlefield()
{
- m_Guid = MAKE_NEW_GUID(m_TypeId, 0, HIGHGUID_TYPE_BATTLEGROUND);
-
@jeremyckahn
jeremyckahn / init_rootfs.sh
Created July 28, 2012 23:52
Setting up Raspbian rootfs on Ubuntu
#!/bin/bash
# For Ubuntu. Probably works elsewhere too.
# This script downloads the Raspbian file system into ~/rpi/chroot-raspbian-armhf
# It also chroots you into the directory, so you can act as a Raspbian user.
# This was all taken from here: http://superpiadventures.com/2012/07/development-environment/
mkdir -p ~/rpi
cd ~/rpi
@rxdazn
rxdazn / gist:2198830
Created March 25, 2012 18:20
moulinette norme epitech
#!/usr/bin/python
#
# Made by duponc_j@epitech.net
# Version: 1.2.1
#
'''
An Epitech norme checker
Usage: python norme.py <files to scan> [-nocheat] [-verbose] [-score] [-libc]
@Intrepidd
Intrepidd / gist:1307618
Created October 23, 2011 17:34
Facebook delete all apps, quite uggly.
// Assuming you have Jquerified the page
// http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet
function deleteApp(tab, index) {
tab[index].click();
setTimeout(function() {
$jq("input[name=remove]").click();
setTimeout(function() {
$jq("input[name=ok]").click();
if (tab[index + 1]) {
@mathiasbynens
mathiasbynens / unicodeEscape.js
Created September 26, 2011 19:50
Escape all characters in a string using both Unicode and hexadecimal escape sequences
// Ever needed to escape '\n' as '\\n'? This function does that for any character,
// using hex and/or Unicode escape sequences (whichever are shortest).
// Demo: http://mothereff.in/js-escapes
function unicodeEscape(str) {
return str.replace(/[\s\S]/g, function(character) {
var escape = character.charCodeAt().toString(16),
longhand = escape.length > 2;
return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2);
});
}