- Bernie Margolis in Java (gist)
- Florent Crivello in Objective-C (gist)
- Srismil Dutta in Javascript (gist)
- Eran Zimbler in Javascript (gist and node.js module)
- Maurin Lenglart in Javascript (gist)
- Ankit Goyal in Ruby (gist, imgur clean notes, original notes)
- Kevin Le Brun in Python (with a nice writeup and tests!) (gist), who accurately notes "I saw a typo in the second test case for the problem. You should replace '194' with '14'."
- C is for Conrad Meyer (another C solution) (gist)
- Péter Ferenczy in Ruby (utilizing laz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#define STB_RECT_PACK_IMPLEMENTATION | |
#include "stb_image.h" | |
#include "stb_image_write.h" | |
#include "stb_rect_pack.h" | |
#include "bitmap.h" | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ini::IniConfig& m_oIniConfig; | |
Ini::CategoryValueMap& mCategories = m_oIniConfig.GetCategories(); | |
if (ImGui::Button("Reload")) | |
{ | |
m_oIniConfig.Load("Config.ini", true, false); | |
} | |
ImGui::SameLine(); | |
if (ImGui::Button("Save")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using System; | |
using System.Collections.Generic; | |
class BuildScript { | |
static string[] SCENES = FindEnabledEditorScenes(); | |
static string APP_NAME = "AngryBots"; | |
static string TARGET_DIR = "target"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2014, Jan Winkler <[email protected]> | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh) | |
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |