Skip to content

Instantly share code, notes, and snippets.

View Cvar1984's full-sized avatar
⚠️
This account is under NSA investigation

Bellatrix Lugosi Cvar1984

⚠️
This account is under NSA investigation
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cvar1984</title>
<meta name="author" content="Cvar1984" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
@Cvar1984
Cvar1984 / encode.php
Created April 28, 2020 12:11
Php quick encode file
<?php
/**
* Copyright (c) 2020 Ramdhan Firmansyah
* File : encode.php
* @author : Cvar1984 <gedzsarjuncomuniti@gmail.com>
* Date : 28.04.2020
* Last Modified Date: 28.04.2020
* Last Modified By : Cvar1984 <gedzsarjuncomuniti@gmail.com>
*/
@Cvar1984
Cvar1984 / daemon.cpp
Created May 2, 2020 19:11 — forked from alexdlaird/daemon.cpp
Useful as a starting point for a C++ based Linux daemon application.
#include <dirent.h>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sys/stat.h>
#include <syslog.h>
/**
* sync multi threading with c++
* flag : -pthread -std=c++0x
*/
#include <thread>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
class MyClass {
@Cvar1984
Cvar1984 / async-parallel.cpp
Last active February 19, 2023 11:29
std::async
/**
* async multi threading with c++
* flag : -pthread -std=c++0x
*/
#include <iostream> // std::cout
#include <unistd.h> // sleep();
#include <future> // std::async
class MyClass {
@Cvar1984
Cvar1984 / irc.php
Last active June 21, 2020 14:39
Simple Internet Relay Chat PHP
<?php
function read_socket($socket)
{
while($rawData = fgets($socket)) {
$data .= $rawData;
}
return $data;
}
<?php
/**
* Class: Info
*
*/
class Info
{
/**
* getPhpVersion
local cron = require 'cron'
relay = {0, 1, 2, 3};
for x in pairs(relay) do
gpio.mode(relay[x], gpio.OUTPUT);
end
pulser = gpio.pulse.build({
{
@Cvar1984
Cvar1984 / adb_input.lua
Created October 28, 2020 20:58
adb shell input.lua
--[[--
Copyright (c) 2020 Ramdhan Firmansyah
File : swipe.lua
Author : Cvar1984 <gedzsarjuncomuniti@gmail.com>
Date : 28.10.2020
Last Modified Date: 28.10.2020
Last Modified By : Cvar1984 <gedzsarjuncomuniti@gmail.com>
--]]--
exec = os.execute;
local touchscreen = {};
--[[--
Copyright (c) 2020 Ramdhan Firmansyah
File : electric.lua
Author : Cvar1984 <gedzsarjuncomuniti@gmail.com>
Date : 16.12.2020
Last Modified Date: 16.12.2020
Last Modified By : Cvar1984 <gedzsarjuncomuniti@gmail.com>
--]]--
local Electric = {};