Skip to content

Instantly share code, notes, and snippets.

View bliz937's full-sized avatar

Vyacheslav Shevchenko bliz937

View GitHub Profile
Was having this problem: https://stackoverflow.com/questions/10957781/google-maps-autocomplete-result-in-bootstrap-modal-dialog
Google maps api not showing suggestions in modal.
This fixed it for me: https://github.com/twbs/bootstrap/issues/4160
Was getting: 'Undefined control sequence' using citep in Latex.
Adding
natbib=true in \usepackage[backend=bibtex,natbib=true]{biblatex}
So I cloned an old Windows server 2003 using Clonezilla.
Did a full clone.
When I restored the clone onto another machine, the computer would boot until the loading windows display.
Tried popping in a windows 7 disk to repair the mbr, etc but that didn't work.
Found out that the problem was hard drive controller type was AHCI on the restored machine whilst on the cloned machine it was IDE.
Setting the hard drive controller in the bios of the restored machine to IDE fixed the problem.
Source: https://social.technet.microsoft.com/Forums/windowsserver/en-US/19402d17-3239-4e8b-b6c6-e06f45f3a123/windows-server-2003-bsod-with-stop-0x0000007b?forum=winserversetup
When attempting to raise the domain functional level on windows server 2003 from 2000 to 2003, I got an error stating that the Active directory service is busy.
My solution was to delete the non existing domain controllers from the domain.
Doing so wasn't as easy as I'd thought, here's a guide on that: http://windowsitpro.com/windows/how-do-i-remove-nonexistent-domain-controller
Source: https://social.technet.microsoft.com/Forums/windowsserver/en-US/4b091a49-e6d4-4f90-965a-ae1d5fddbb5f/error-when-trying-to-raise-domain-functional-level-from-2000-to-2003?forum=winserverDS
Getting denied dns requests.
Solution:
vim /usr/share/zentyal/stubs/dns/named.conf.local.mas
Add your network under localnets, ie line 14
acl "trusted" {
% foreach my $intnet (@intnets) {
<% $intnet %>;
Link: http://windowsitpro.com/windows/how-do-i-remove-nonexistent-domain-controller
@bliz937
bliz937 / MySQL csv import
Created February 11, 2015 07:04
Adding a csv file into a mysql database
Before you start, you need to have a database and table up.
The table must contain all the relavent attributes in place.
Start up a mysql console.
On Wamp, left click on the wamp icon in the task bar -> MySQL -> MySQL Console
After entering your credentials, enter the below commands:
use DataBase
@bliz937
bliz937 / Standard Bank IT Challenge 2015 setup
Created May 16, 2015 14:49
The setup script I used for SBITC 2015
#!/bin/bash
SDK=http://172.16.38.38/iso/OtherStuff/Java/jdk-8u45-linux-x64.gz
PY2=http://172.16.38.38/iso/OtherStuff/Python/Python-2.7.6.tgz
PY3=http://172.16.38.38/iso/OtherStuff/Python/Python-3.4.0.tgz
SUBL=http://172.16.38.38/iso/OtherStuff/Sublime/Sublime%20Text%202.0.2%20x64.tar.bz2
ECLIPSE=http://172.16.38.38/iso/OtherStuff/Eclipse/eclipse-java-luna-SR2-linux-gtk-x86_64.tar.gz
cd /tmp/
imgDIR = "D:\\!current\\nathan\\cohn-kanade\\"
outDIR = "D:\\!current\\nathan\\output\\"
CSV = "D:\\!current\\nathan\\CK.database.FACS.csv"
fileSlash = "\\"
import csv
import os
import shutil
def subjectFix(subject):
#import socket module
from socket import *
serverSocket = socket(AF_INET, SOCK_STREAM)
#Prepare a sever socket
#Fill in start
#Fill in end
while True:
#Establish the connection
print 'Ready to serve...'
connectionSocket, addr = #Fill in start #Fill in end