-
use wget to mirror the whote site
wget -c -r -p -np -nc -k https://sp18.datastructur.es/
-
extract the links starting with "https://docs.google.com/present" from .html files
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 | |
| # Generate IMA keys. For details, please check, | |
| # https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/managing_monitoring_and_updating_the_kernel/extending-customizing-and-troubleshooting-kernel-integrity-subsystem#creating-custom-ima-keys-using-openssl | |
| cat <<END >> ima_ca.conf | |
| [ req ] | |
| default_bits = 2048 | |
| distinguished_name = req_distinguished_name | |
| prompt = no | |
| string_mask = utf8only |
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
| ifndef KDIR | |
| KDIR = /lib/modules/`uname -r`/build | |
| endif | |
| obj-m := hello_world.o | |
| kbuild: | |
| make -C $(KDIR) M=`pwd` | |
| load: kbuild |
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
| 1 FAILED: | |
| Found errors in Test_terminal_syn_pwd(): | |
| Run 1: | |
| Caught exception in Test_terminal_syn_pwd(): Vim(call):E121: Undefined variable: Xtopdir @ function RunTheTest[39]..Test_terminal_syn_pwd, line 13 | |
| Run 2: | |
| Caught exception in Test_terminal_syn_pwd(): Vim(call):E121: Undefined variable: Xtopdir @ function RunTheTest[39]..Test_terminal_syn_pwd, line 13 | |
| Flaky test failed too often, giving up |
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
| rofi usage: | |
| rofi [-options ...] | |
| Command line only options: | |
| -no-config Do not load configuration, use default values. | |
| -v,-version Print the version number and exit. | |
| -dmenu Start in dmenu mode. | |
| -display [string] X server to contact. | |
| ${DISPLAY} | |
| -h,-help This help message. |
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
| #!/usr/bin/env python3 | |
| # -*- coding:utf-8 -*- | |
| # | |
| import cgi | |
| from urllib.request import urlopen | |
| from urllib.parse import unquote | |
| import re | |
| def download(url, folder): |
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
| <?php | |
| /** | |
| * process Excel data from Chunpeng | |
| * | |
| * @author Coiby | |
| * @date 2012.7.28 | |
| * @version V1 | |
| */ | |
| error_reporting(E_ALL); |
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
| I'm using ZF1.11+Doctrine2. | |
| Assume that the user already logged in(using preDispatch method to check whether identity whether exists) and the User entity is stored in session. The user goes to his/her homepage and all the sites and tags(SiteController) belonging to him/her should be listed. The SiteController class has a member $service(Application_Service_Site) through which add site/tag will be done. | |
| Application_Service_Site class has a member $user which is obtained from $session when the class is constructed. Application_Service_Site also has other members, i.e UserSiteTags, Sites, Tags all of which are type of object Collection. These members are provided by Entity Manager. | |
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
| $user = $session->user;; //get user from session | |
| $site = new Site(); //Could be already given | |
| $term = new Term(); //Could be already given | |
| $UserSiteTerms = $this->em->getRepository('Entities\UserSiteTerm')->find($user->getUid());//find UserSiteTerm according to userId | |
| //foreach $UserSiteTerms | |
| $userSiteTerm[i]->setUser($user); | |
| $user->addUserSiteTerm($userSiteTerm[i]); |