Skip to content

Instantly share code, notes, and snippets.

@wcypierre
wcypierre / Fn_GetDatatypeString.sql
Created June 28, 2020 12:18
[Sql Server] Generate Datatype String based on information_schema.columns
/****** Object: UserDefinedFunction [dbo].[Fn_GetDatatypeString] Script Date: 6/28/2020 6:49:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[Fn_GetDatatypeString]
(
@wcypierre
wcypierre / dell-ipmi-fan-control.sh
Created June 24, 2020 02:41
Fan Control for Dell Server in ESXI
#!/bin/bash
#
# crontab -l > mycron
# echo "#" >> mycron
# echo "# At every 2nd minute" >> mycron
# echo "*/2 * * * * /bin/bash /scripts/dell_ipmi_fan_control.sh >> /tmp/cron.log" >> mycron
# crontab mycron
# rm mycron
# chmod +x /scripts/dell_ipmi_fan_control.sh
#
@wcypierre
wcypierre / web-servers.md
Created June 10, 2019 22:30 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@wcypierre
wcypierre / monica.sql
Created February 20, 2019 16:11
Monica SQL Structure for Commit b329affb2a2f61fd7019649c5137d7dd463c49fb
-- MySQL dump 10.16 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: monica
-- ------------------------------------------------------
-- Server version 10.1.38-MariaDB-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
@wcypierre
wcypierre / log.sh
Last active August 29, 2015 14:13
interface log
#!/bin/sh
# cron script for checking wlan connectivity
# change xxx to whatever IP you want to check.
IP_FOR_TEST="xxx"
PING_COUNT=1
PING="/bin/ping"
IFUP="/sbin/ifup"
IFDOWN="/sbin/ifdown --force"
# mh theme
# preview: http://cl.ly/1y2x0W0E3t2C0F29043z
function toon {
#echo -n " "
}
# features:
# path is autoshortened to ~30 characters
# displays git status (if applicable in current folder)
@wcypierre
wcypierre / gateone_setup.sh
Last active December 23, 2015 02:38
gateone_setup.sh
#!/bin/bash
apt-get update -y;
apt-get install g++ debconf autoconf binutils bison debhelper python-dev python3 python-support python-pip python-openssl python-pam git dtach libpng-dev libjpeg-dev -y
cd /usr/;
git clone https://github.com/liftoff/GateOne.git
pip install --upgrade tornado stdeb slimit cssmin Pillow mutagen futures
cd /usr/GateOne/;
python setup.py install
start gateone
@wcypierre
wcypierre / Windows OS Download list
Last active May 6, 2023 20:06
Windows OS Download list
Windows 7 SP1 ISO:
http://www.w7forums.com/official-windows-7-sp1-iso-image-downloads-t12325.html
Windows XP ISO:
http://download.microsoft.com/download/e/e/9/ee9d0116-c9fe-4fc2-b59c-406cbfb6d515/xpsp3_5512.080413-2113_usa_x86fre_spcd.iso
http://download.microsoft.com/download/8/1/d/81d1f546-f951-45c5-964d-56bdbd758ba4/w2k3sp2_3959_usa_x64fre_spcd.iso
Windows 98 Live CD:
http://www.archive.org/download/Windows98LiveCd/Windows98LiveCdIso.iso
Unable to run a virtualized Ubuntu due to low spec hardware? Lazy to start up your VMWare and wait for it to boot your Ubuntu? Unable to do any homework at library due to the lack of Ubuntu? Fear no more!
@wcypierre
wcypierre / Low ping from Malaysia to <Destination>
Created August 9, 2013 17:52
Low ping from Malaysia to <Destination>
US
- Los Angeles(190 - 210, avg >205) - Easy to find, cheap
- San Diego(190 - 200, avg 200) - Hard to find or costly
Germany
- idk where(200+ - 220) - hard to find, costly, but its not at US