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 | |
# Set the macOS installer path as a variable | |
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
echo "macOS installer is \"$MACOS_INSTALLER\"" | |
# Set the target disk as a variable | |
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
echo "Target disk is \"$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
// | |
// main.m | |
// CacheImpl | |
// | |
// Created by lim on 3/26/19. | |
// Copyright © 2019 lim. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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> | |
#include <stdlib.h> | |
#define CONV_SIZE 180 | |
#define RB_SIZE (CONV_SIZE*2) | |
#define BUFF_SIZE 4096 | |
int8_t a[RB_SIZE]; | |
int8_t b[RB_SIZE]; |
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
0 x x x x x x x | |
0 00 x0 x0 x0 x0 x0 x0 x0 | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx | |
x 0x xx xx xx xx xx xx xx |
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 <Adafruit_NeoPixel.h> | |
const int LED_PIN = 2; //D4 | |
// 0 - D3 | |
// 1 - TX | |
// 2 - D4 LED | |
// 3 - RX | |
// 4 - D2 | |
// 5 - D1 | |
// 6 - halt |
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> | |
#include <stdlib.h> | |
int main() | |
{ | |
FILE *f, *g, *h; | |
f = fopen("f", "r"); | |
g = fopen("g", "w"); | |
h = fopen("h", "w"); |
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> | |
void reverse_array(int *arr, int start, int end) | |
{ | |
for (int i = start; i < (start + end) / 2; i++) | |
{ | |
arr[i] ^= arr[end + start - i - 1]; | |
arr[end + start - i - 1] ^= arr[i]; | |
arr[i] ^= arr[end + start - i - 1]; | |
} |
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 abs(x) ((x)<0 ? -(x) : (x)) | |
double calc_prec(double x, double pr) | |
{ | |
double s = 0; | |
double n = 1; | |
double k = 1; | |
double xx = x; |
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 <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#include <DNSServer.h> | |
#include <ESP8266WebServer.h> | |
#include <Adafruit_NeoPixel.h> | |
#include "FS.h" | |
//const char ssid[] = "AnchorFree"; | |
//const char pass[] = "wifi4free!"; |
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 | |
NOW=$(date +"%Y-%m-%d") | |
NUMBER=`cat radio-t_number` | |
RADIOTDIR=~/RadioT/${NUMBER}_${NOW} | |
mkdir -p $RADIOTDIR | |
cd $RADIOTDIR | |
while [ ! -f stream.m3u ]; do | |
wget http://stream.radio-t.com:8181/stream.m3u |
NewerOlder