$ mount /dev/sdaX /mnt
$ mount --bind /dev /mnt/dev
$ mount --bind /dev/pts /mnt/dev/pts
$ mount --bind /proc /mnt/proc
$ mount --bind /sys /mnt/sys
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
#!/bin/bash | |
################################# | |
# Speech Script by Dan Fountain # | |
# Modified by Pablo Castagnino # | |
# TalkToDanF@gmail.com # | |
################################# | |
INPUT=$* | |
STRINGNUM=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
#!/bin/bash | |
# | |
# arrancar_equipos.sh - Un script que enciende los equipos por WOL. | |
# | |
# Este código es software libre. Puede redistribuirlo y/o modificarlo bajo los términos de la | |
# Licencia Pública General de GNU según es publicada por la Free Software Foundation, bien de la | |
# versión 2 de dicha Licencia o bien (según su elección) de cualquier versión posterior. | |
# Este programa se distribuye con la esperanza de que sea útil, pero SIN NINGUNA GARANTÍA, incluso | |
# sin la garantía MERCANTIL implícita o sin garantizar la CONVENIENCIA PARA UN PROPÓSITO PARTICULAR. | |
# Véase la Licencia Pública General de GNU para más detalles. |
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
diskpart | |
list disk | |
select disk X | |
clean | |
create partition primary | |
select partition 1 | |
active | |
format fs=fat32 quick | |
assign | |
exit |
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
#!/bin/bash | |
# Time | |
# Locattion: /sys/devices/platform/sony-laptop/kbd_backlight_timeout | |
# where: 0(default)=10secs, 1=30secs, 2=60secs and 3=unlimited | |
path="/sys/devices/platform/sony-laptop/kbd_backlight" | |
if [ $(<$path) -eq 1 ] | |
then | |
newval=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
const http = require('http'); | |
function downloadFile(url) { | |
return new Promise((resolve, reject) => { | |
const chunks = []; | |
const request = http.get(url, response => { | |
response.on('data', chunk => { | |
chunks.push(chunk); | |
}); | |
response.on('end', () => { |
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
#include <stdio.h> | |
#define MOD 10000 | |
int main(int argc, char const *argv[]) { | |
int N, P, result = 1; | |
scanf("%d %d", &N, &P); | |
for (int i = 0; i < P; i++) { | |
result = (result * (N % MOD)) % MOD; | |
} |
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
#include <stdio.h> | |
#define MOD 10000 | |
int my_pow(int N, int P) { | |
if (P == 0) return 1; | |
if (P == 1) return (N % MOD); | |
int temp_pow = my_pow(N, P/2); | |
if ((P % 2) == 0) { |
OlderNewer