Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

darkworks

🏠
Working from home
Block or report user

Report or block darkworks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@darkworks
darkworks / esp8266.ino
Created Aug 28, 2019 — forked from xesscorp/esp8266.ino
This program issues commands to an ESP8266 Wifi module in order to receive an HTML page from a website.
View esp8266.ino
///////////////////////////////////////////////////////////////////////////////////////
// This program uses the ESP8266 Wifi module to access a webpage. It's an adaptation of
// the program discussed at http://hackaday.io/project/3072/instructions
// and shown here http://dunarbin.com/esp8266/retroBrowser.ino .
//
// This program was ported to the ZPUino 2.0, a softcore processor that runs on an FPGA
// and emulates an Arduino.
//
// This program works with version 00160901 of the ESP8266 firmware.
///////////////////////////////////////////////////////////////////////////////////////
@darkworks
darkworks / .htaccess
Created May 24, 2019 — forked from tyte/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@darkworks
darkworks / ImageManipulator.php
Created Feb 21, 2019 — forked from philBrown/ImageManipulator.php
Image manipulation class, provides cropping, resampling and canvas resize
View ImageManipulator.php
<?php
class ImageManipulator
{
/**
* @var int
*/
protected $width;
/**
* @var int
@darkworks
darkworks / MediaQueries.css
Created Dec 8, 2018
css media queries for mobiles and desktop #css
View MediaQueries.css
@media only screen and (min-width: 1240px)
#Wrapper, .with_aside .content_wrapper {
max-width: 1210px;
}
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
View canvas-animation.js
function Animation(canvasId, fps) {
this.canvas = document.getElementById(canvasId);
this.drawingContext = this.canvas.getContext('2d');
this.fps = fps;
this.drawing = {};
this.frame = 0;
this.start();
}
Animation.prototype.start = function() {
@darkworks
darkworks / genius-programmer.md
Created Oct 16, 2018 — forked from joepie91/genius-programmer.md
The One Secret Trick To Becoming A Genius Programmer
View genius-programmer.md

The One Secret Trick To Becoming A Genius Programmer

Okay, the title of this post is a bit of a lie. There's no one secret trick to becoming a genius programmer - there are two, and they're more habits than tricks. Nevertheless, these kind of 'secret tricks' seem to resonate with people, so I went for this title anyway.

Every once in a while, a somewhat strange thing happens to me. I'll be helping somebody out on IRC - usually a beginner - answering a number of their questions in rapid succession, about a variety of topics. Then after a while, they call me a "genius" for being able to answer everything they're asking; either directly, or while talking about me to somebody else.

Now, I don't really agree with this "genius" characterization, and it can make me feel a bit awkward, but it shows that a lot of developers have a somewhat idealistic and nebulous notion of the "genius programmer" - the programmer that knows everything, who can do everything, who's never stumped by a problem, and of which ther

@darkworks
darkworks / media-query.css
Created Oct 16, 2018 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
View random_strgenerator.php
/**
* Generate and return a random characters string
*
* Useful for generating passwords or hashes.
*
* The default string returned is 8 alphanumeric characters string.
*
* The type of string returned can be changed with the "type" parameter.
* Seven types are - by default - available: basic, alpha, alphanum, num, nozero, unique and md5.
*
@darkworks
darkworks / vpn.md
Created Oct 4, 2018 — forked from joepie91/vpn.md
Don't use VPN services.
View vpn.md

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

@darkworks
darkworks / secure_link.php
Last active Sep 18, 2018 — forked from bftanase/secure_link.php
generate URL for nginx secure_link #nginx #linux
View secure_link.php
You can’t perform that action at this time.