Skip to content

Instantly share code, notes, and snippets.

View wcoder's full-sized avatar
🎯
Focusing

Yauheni Pakala wcoder

🎯
Focusing
View GitHub Profile
@wcoder
wcoder / reset_standart_styles.css
Created March 29, 2014 11:16
Reset browser styles
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
outline: none;
}
html { height: 101%; } /* always display scrollbars */
@wcoder
wcoder / tags.html
Created March 29, 2014 11:18
Meta tags for responsive page
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
@wcoder
wcoder / wrap_pre.css
Created March 29, 2014 11:19
Wrap space for <pre>
pre {
white-space: pre-wrap; /* Chrome & Safari */
white-space: -moz-pre-wrap; /* Mozilla since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
@wcoder
wcoder / global.js
Created April 13, 2014 20:38
Array Remove - By John Resig
// Array Remove - By John Resig (MIT Licensed)
Array.prototype.remove = function (from, to) {
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
};
@wcoder
wcoder / mixer.js
Created April 13, 2014 20:42
Class for mixing
/**
* Class for mixing
*
* Use:
* var input = document.querySelector('#input').innerText;
* var output = Mixer.shuffleString(input);
*/
(function(w) {
var mixer = {};
(function(){
// by https://gist.github.com/wcoder/10601500
var shuffleArray = function (array) {
for (var j, x, i = array.length; i;)
{
j = j = parseInt(Math.random() * i);
x = array[--i];
array[i] = array[j];
array[j] = x;
@wcoder
wcoder / asd.cs
Last active August 29, 2015 14:04
using System;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;
namespace POCWebViewUniversal
{
class Auth
{
private const string MainPage = "";
private const string LoginPage = "";
@wcoder
wcoder / cheat-views.sh
Created November 8, 2014 13:04
Bash-script to cheat counter views.
#!/bin/bash
echo "Page URL:"
read URL
echo "How many times do we see:"
read NUMBER
mkdir /tmp/cheet_views
cd /tmp/cheet_views
function isModernBrowser()
{
return 'querySelector' in document &&
'localStorage' in window &&
'addEventLitener' in window;
}
using System;
using System.Diagnostics;
using System.IO;
class Program
{
static void Main()
{
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = @"C:\someapp.exe"; // full path