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
body { | |
background-color: white; | |
color: black; | |
font-family: sans-serif; | |
font-size: 100%; | |
} |
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
@echo off | |
mkdir C:\Flyt | |
icacls C:\Flyt /grant:r Everyone:(CI)(OI)M | |
net share Flyt=C:\Flyt /GRANT:Everyone,CHANGE /USERS:2 /CACHE:None | |
pause |
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
import time | |
import tornado.ioloop | |
import tornado.web | |
import pymysql | |
# HTML templates | |
html_begin = '''<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> |
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
// Build: x86_64-w64-mingw32-gcc -Wall -mwindows -Os -s -o Keep-Windows-Awake.exe Keep-Windows-Awake.c | |
#include <windows.h> | |
int main() { | |
/* Keep Windows awake for the lifetime of this thread */ | |
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED); | |
/* Wait via a messagebox */ | |
MessageBox(NULL, "Windows is now being prevented from falling asleep.\n\nPress OK to end this...", "Keep-Windows-Awake", MB_OK | MB_ICONINFORMATION); | |
} |
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
// Freestanding with MinGW: | |
// http://nullprogram.com/blog/2016/01/31/ | |
// http://nullprogram.com/blog/2016/02/28/ | |
// https://support.microsoft.com/da-dk/kb/99456 | |
#include <windows.h> | |
int WINAPI mainCRTStartup(void) | |
{ | |
char msg[] = "Hello, world!\n"; |
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
For alle: Start med cd til roden af projekt-mappe | |
----- ZLIB ----- | |
# wget -P ./download/ http://zlib.net/zlib-1.2.8.tar.gz | |
- Slet eksisterende zlib dir | |
- Udpak i zlib dir således at strukturen er: ./zlib/zlib.h | |
# cd zlib |
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
// Compile with MS cmd-line: cl basic_windows_application.c user32.lib | |
// Compile with Embarcadero cmd-line: bcc32c -tW -tU basic_windows_application.c | |
// Compile from Ubuntu: x86_64-w64-mingw32-gcc -mwindows -municode -Os -o basic.exe basic_windows_application.c | |
// Compile with Digital Mars C: dmc basic_windows_application.c | |
// + strip basic.exe | |
#include <windows.h> | |
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |
{ |
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/bash | |
L1=`grep $1 /etc/shadow|cut -d ":" -f 2` | |
if [ $L1 ]; then | |
SALT=`echo $L1|cut -d "$" -f 3` | |
L2=`mkpasswd --salt=$SALT --method=sha-512 $2` | |
if [ "$L1" == "$L2" ]; then | |
exit 0 | |
else | |
exit 1 |
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
# fold -s -w 70 | |
import sys | |
import random | |
cons = 'bcdfghjklmnpqrstvwxz' | |
consx = 'hjqvwx' | |
vows = 'aeiouy' | |
cvless = 'qxyz' | |
def generate_word(cap): |
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
-- Log incoming SQL on MySQL server: | |
set global log_output=FILE; | |
set global general_log_file="C:/Test/MySQL.log"; | |
set global general_log=1; | |
-- Turn off: | |
set global general_log=0; |
OlderNewer