This file contains hidden or 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 System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Dynamic; | |
namespace guerillacoder | |
{ | |
internal class Program | |
{ |
This file contains hidden or 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
// This is a modification of https://mhusseini.wordpress.com/2014/05/03/fast-named-formats-in-c. | |
// To make it work as a flexible templating system I modified it so that it can use dynamic objects | |
// and silently removes unused fields. | |
// I am not sure how this has effected its performance. | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; |
This file contains hidden or 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
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>() | |
}; |
This file contains hidden or 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
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \; |
This file contains hidden or 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 System; | |
using System.Drawing; | |
using System.Windows.Forms; | |
namespace DrawCar | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ |
This file contains hidden or 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
namespace mat_islem | |
{ | |
public static class matematik | |
{ | |
public static int cift(int a, int b) | |
{ | |
if (a < b) | |
{ |
This file contains hidden or 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
void Main() | |
{ | |
//If the calling context is important (for example in GUI applications) | |
//you'd might want to save the Synchronization Context | |
//for example: context = SynchronizationContext.Current | |
//and use if in the lambda below e.g. s => context.Post(s => this.Close(), null) | |
var timer = new System.Threading.Timer( | |
s => this.Close(), null, CalcMsToHour(23, 00, 00), Timeout.Infinite); | |
} |
This file contains hidden or 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
TimeSpan ts = TimeSpan.FromMilliseconds(Environment.TickCount); | |
Console.WriteLine("{0}d {1}h {2}m {3}s", ts.Days, ts.Hours, ts.Minutes, ts.Seconds); | |
//--------------------------- | |
using System.Diagnostics; | |
PerformanceCounter upTime = new PerformanceCounter("System", "System Up Time"); | |
upTime.NextValue(); | |
TimeSpan ts = TimeSpan.FromSeconds(upTime.NextValue()); | |
Console.WriteLine("{0}d {1}h {2}m {3}s", ts.Days, ts.Hours, ts.Minutes, ts.Seconds); |
This file contains hidden or 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/sh | |
#/etc/init.d/MyMonoApp | |
# | |
APP_NAME="MyMonoApp" | |
APP_PATH="/home/mono/MyMonoApp" | |
APP_USER=mono | |
case "$1" in |
This file contains hidden or 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
#include | |
#include "windows.h" | |
#include "stdlib.h" | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
HANDLE prochandle; //a handle to the process we want to inject our dll into | |
HANDLE threadhandle; //this will be a handle to the remote thread we will create |