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 python3 | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
from os import curdir, sep | |
import cgi | |
class myHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
return |
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/sh | |
KERNEL=$HOME/kernel/staging/arch/x86_64/boot/bzImage | |
ARGS='ignore_loglevel console=ttyS0' | |
qemu-system-x86_64 -enable-kvm -kernel $KERNEL -append "$ARGS" -nographic |
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
--- | |
BasedOnStyle: LLVM | |
Language: Cpp | |
IndentWidth: 8 | |
UseTab: Always | |
BreakBeforeBraces: Linux | |
AlwaysBreakBeforeMultilineStrings: true | |
AllowShortIfStatementsOnASingleLine: false | |
AllowShortLoopsOnASingleLine: false | |
AllowShortFunctionsOnASingleLine: false |
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 <iostream> | |
#include <iterator> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
template <typename T> | |
ostream& operator<< (ostream& out, const vector<T>& v) { |
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 <SparkFun_ADXL345.h> | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); | |
ADXL345 adxl = ADXL345(); | |
void setup() { | |
Serial.begin(9600); | |
lcd.begin(16, 2); |
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
FF FF 26 FD 03 FF C0 00 --> 67092480 | |
AB 6A 0D E2 03 FF C0 00 | |
93 81 88 A1 00 00 00 00 | |
93 DA 90 02 00 00 00 00 | |
00 E8 00 13 00 06 71 D8 --> 422360 | |
--> 83592 | |
--> 55744 | |
00 17 00 04 00 00 6C C0 --> 27840 | |
00 01 00 01 00 00 00 00 |
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/sh | |
BACKUP_SOURCE=/ | |
BACKUP_TARGET=/run/media/cengiz/BACKUP/arch_gnome_yedek | |
sudo rsync -aAXvH --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/*/.thumbnails/*","/home/*/.cache/mozilla/*","/home/*/.cache/chromium/*","/home/*/.local/share/Trash/*","/home/*/.ccache/*"} $BACKUP_SOURCE $BACKUP_TARGET |
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
[root@nostromo efivars]# efivar -p --name "7c436110-ab2a-4bbb-a880-fe41995c9f82-SystemAudioVolume" | |
GUID: 7c436110-ab2a-4bbb-a880-fe41995c9f82 | |
Name: "SystemAudioVolume" | |
Attributes: | |
Non-Volatile | |
Boot Service Access | |
Runtime Service Access | |
Value: | |
00000000 5d |] | |
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
Device (SMC) | |
{ | |
Name (_HID, EisaId ("APP0001")) // _HID: Hardware ID | |
Name (_CID, "smc-huronriver") // _CID: Compatible ID | |
Name (_STA, 0x0B) // _STA: Status | |
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings | |
{ | |
IO (Decode16, | |
0x0300, // Range Minimum | |
0x0300, // Range Maximum |
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
bool isHappy(int n) { | |
int sum = 0, | |
value = n, | |
tries = 10; | |
char str[255] = { 0, }; | |
while (1) { | |
sprintf(str, "%d", value); | |
for (size_t i = 0; i < strlen(str); i++) { | |
int digit = str[i] - 48; |