Skip to content

Instantly share code, notes, and snippets.

View WildGenie's full-sized avatar
🤖
I ❤️ Machine Learning

Bilgehan Zeki ÖZAYTAÇ WildGenie

🤖
I ❤️ Machine Learning
View GitHub Profile
@jankkhvej
jankkhvej / shellcommand.sh
Created August 1, 2011 06:52 — forked from anonymous/shellcommand.sh
script to parse PHP short open tags and convert ones to normal
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \;
@slimbo
slimbo / htb-css3-leaderboard-abridged.html
Created May 6, 2012 21:31
Hit the Bits! - CSS3 Leaderboard - Abridged
<style type="text/css">
#leaderboard #players li {
position: absolute;
-moz-transition-duration: 1s;
-webkit-transition-duration: 1s;
-ms-transition-duration: 1s;
}
#leaderboard #players {
position: relative;
}
@avalanche123
avalanche123 / timeout.php
Created July 10, 2012 19:12
timeouts in php
<?php
class TimeoutException extends RuntimeException {}
class Timeout
{
private $active;
public function set($seconds)
{
@Ummon
Ummon / NewtworkManagerConnection.cs
Created December 17, 2012 10:18
To control the Network Manager on Ubuntu with DBUS and C#/Mono. D-BUS documentation: * The D-BUS Network Manager: http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Settings.Connection * The D-BUS C# free library: https://github.com/mono/dbus-sharp and http://www.ndesk.org/DBus_Documentation * D-B…
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using DBus;
namespace IPChangerPrototype
{
public enum Method
# It looks like -multiwindow mode triggers the static color visual in both the internal x2go xserver and the external vcxsrv
# But it also looks like -multiwindow mode is how x2go client allows resizing of the remote desktop
# ...so I'm looking for a way to allow resizing of remote desktop w/out triggering static color visual.
#
# ...output of vcxsrv.exe's usage note:
Usage...
Vcxsrv [:<display>] [option]
:display-number
// Using leaflet.js to pan and zoom a big image.
// See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
// create the slippy map
var map = L.map('image-map', {
minZoom: 1,
maxZoom: 4,
center: [0, 0],
zoom: 1,
crs: L.CRS.Simple
@shamil
shamil / mount_qcow2.md
Last active June 5, 2026 10:42
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@jankurianski
jankurianski / ControlSnapshot.cs
Created December 2, 2014 07:18
Takes a screenshot of a Windows Forms control using BitBlt, making it work with CefSharp's WinForms.ChromiumWebBrowser
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class ControlSnapshot
{
public static Bitmap Snapshot(Control c)
{
@chitoku-k
chitoku-k / ObservableKeyedCollection.cs
Created December 31, 2014 15:53
ObservableKeyedCollection
using System;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
/// <summary>
/// キーが値に埋め込まれているコレクションを提供します。
/// </summary>
/// <typeparam name="TKey">コレクション内のキーの型。</typeparam>
/// <typeparam name="TItem">コレクション内の項目の型。</typeparam>
public class ObservableKeyedCollection<TKey, TItem> : KeyedCollection<TKey, TItem>, INotifyCollectionChanged
protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context)
{
base.RequestStartup(container, pipelines, context);
var formsAuthConfiguration =
new FormsAuthenticationConfiguration()
{
DisableRedirect = true,
UserMapper = container.Resolve<IUserMapper>()
};