This file contains 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
class Author: | |
def __init__(self,author_id,author_name): | |
self.author_id = author_id | |
self.author_name = author_name | |
def get_id(self): | |
return self.author_id | |
def get_author_name(self): | |
return self.author_name |
This file contains 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 copy | |
class Course: | |
def __init__(self,course_id,course_title,course_price,course_level_begin,course_level_end): | |
self.course_id = course_id | |
self.course_title = course_title | |
self.course_price = course_price | |
self.reputation = 0 | |
self.school = '' | |
self.course_pre = 0 |
This file contains 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
class Course: | |
def __init__(self,course_id,course_title,course_price,course_level_begin,course_level_end): | |
self.course_id = course_id | |
self.course_title = course_title | |
self.course_price = course_price | |
self.reputation = 0 | |
self.school = '' | |
self.course_pre = 0 | |
self.course_post = 0 | |
self.course_level_begin=course_level_begin |
This file contains 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 socket | |
import sys | |
# Inisialisasi Create a TCP/IP socket | |
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
#Koneksi | |
server_address = ('www.detik.com', 80) | |
print >>sys.stderr, 'connecting to %s port %s' % server_address |
This file contains 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 asyncore | |
import socket | |
import sys | |
import threading | |
def response_teks(): | |
hasil = "HTTP/1.1 200 OK\r\n" \ | |
"Content-Type: text/plain\r\n" \ | |
"Content-Length: 7\r\n" \ | |
"\r\n" \ |
This file contains 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains 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
J=/home/royyana/cobaroot/jail | |
mkdir -p $J | |
mkdir -p $J/bin | |
mkdir -p $J/lib | |
mkdir -p $J/lib/x86_64-linux-gnu | |
mkdir -p $J/lib64 | |
cd $J | |
cp -v /bin/bash $J/bin | |
cp -v /bin/ls $J/bin | |
cp -v /bin/busybox $J/bin |
This file contains 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
1. mendapatkan nama adapter | |
$X=(Get-NetAdapter | out-string -Stream |SElect-String -Pattern 'Ethernet [0-9]' | ConvertFrom-String) | |
$Y=$X.P1+" "+$X.P2 | |
Write-Host $Y | |
Ethernet 6 | |
2. mendapatkan setting dns server | |
Get-DnsClientServerAddress -InterfaceAlias $Y | Select-Object ServerAddresses |
This file contains 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
# Configure Time Zone and NTP server | |
# Variables | |
$TimeZone = "SE Asia Standard Time" | |
$NTPServer = "ntp.its.ac.id" | |
# Configure NTP and restart service | |
Set-TimeZone -Id $TimeZone -PassThru | |
Push-Location | |
Set-Location HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers |
This file contains 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
#!/usr/bin/env bash | |
#by greg minshall | |
needs=`readelf -d $1 | \ | |
awk '$2=="(NEEDED)" { | |
gsub("[][]", "", $5); | |
hits[$5]=$5 | |
} | |
END { |
OlderNewer