radeon module
__init radeon_init() (radeon_device.c)
=> radeon_kms_pci_driver.probe = radeon_pci_probe
=> if (radeon_modeset == 1)
"radeon kernel modesetting enabled.\n"
driver = &kms_driver
pdriver = &radeon_kms_pci_driver
radeon_register_atpx_handler() (radeon_atpx_handler.c)
=> drm_pci_init() (drm_pci.c)
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
<?php | |
// I know, I know, there are proc_open, exec, system functions to use. | |
// But they just suck... | |
// So I wrote this, hope this will help ourselves out :3 | |
function subprocess($cmd, $login = FALSE, $cwd = './', | |
$shell = '/bin/bash', $pipespec = NULL) { | |
$pid = getmypid(); |
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
package net.momoka; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
/** | |
* Hello world! | |
* | |
*/ |
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/python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import shlex | |
import sys | |
import subprocess | |
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
# -*- coding: utf-8 -*- | |
import json | |
import logging | |
from sqlalchemy import create_engine | |
from sqlalchemy import types | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.sql.schema import MetaData, Table | |
from sqlalchemy import Column, Integer |
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
# -*- coding: utf-8 -*- | |
from jinja2 import Environment, FileSystemLoader | |
env = Environment(loader=FileSystemLoader('templates')) | |
t = env.get_template('test.jinja2') | |
print(t.render(name='world')) |
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
# -*- coding: utf-8 -*- | |
import gc | |
s = {} | |
for i in gc.get_objects(): | |
_ = str(type(i)) | |
if _ in s: | |
s[_] += 1 | |
else: |
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/python2 | |
# -*- coding: utf-8 -*- | |
import logging | |
import os | |
import re | |
import subprocess | |
import sys | |
import syslog | |
import dns.resolver |
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
<?php | |
/* from unix timestamp to date */ | |
$time = time(); | |
echo date("Y-m-d H:i:s", $time),"\n"; | |
/* from date string to timestamp */ | |
$date = '2011-01-01 00:00:00'; | |
echo strtotime($date),"\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
<?php | |
/* input the year and week you want, then get the date! */ | |
function getFirstDayOfWeek($year, $weeknr, $date_format="Y-m-d"){ | |
$offset = date('w', mktime(0,0,0,1,1,$year)); | |
$offset = ($offset < 5) ? 1-$offset : 8-$offset; | |
$monday = mktime(0,0,0,1,1+$offset,$year); | |
$date = strtotime('+' . ($weeknr - 1) . ' weeks', $monday); | |
return date($date_format,$date); | |
} |