Skip to content

Instantly share code, notes, and snippets.

View ridixcr's full-sized avatar
🎧
Working from home

Pavel ridixcr

🎧
Working from home
View GitHub Profile
@ridixcr
ridixcr / javascript-trim-svg-whitespace.js
Created December 12, 2018 21:44 — forked from john-doherty/javascript-trim-svg-whitespace.js
Trim whitespace from SVG elements
function trimSvgWhitespace() {
// get all SVG objects in the DOM
var svgs = document.getElementsByTagName("svg");
// go through each one and add a viewbox that ensures all children are visible
for (var i=0, l=svgs.length; i<l; i++) {
var svg = svgs[i],
box = svg.getBBox(), // <- get the visual boundary required to view all children
@ridixcr
ridixcr / malawi-built.geojson
Last active April 14, 2018 00:06
Malawi GeoJson's
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ridixcr
ridixcr / gist:3075d8e347f0517fbe512ad9cb74537f
Created April 13, 2018 23:56 — forked from gonzalo123/gist:868939
push existing repository to github
cd existing_git_repo
git remote add origin git@github.com:[user]/[reponame].git
git push -u origin master
@ridixcr
ridixcr / kenya1-forestland-dense.geojson
Last active April 13, 2018 16:35
GeoJson Kenya 1 Forest Land
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ridixcr
ridixcr / IrcSenderSimple.java
Created April 12, 2018 19:54 — forked from kawakami-o3/IrcSenderSimple.java
Simple IRC Client in Java
import java.net.*;
import java.io.*;
import java.util.*;
class IrcSenderSimple {
static void sendString(BufferedWriter bw, String str) {
try {
bw.write(str + "\r\n");
bw.flush();
}
@ridixcr
ridixcr / IRCMessageLoop.java
Created April 12, 2018 19:54 — forked from kaecy/IRCMessageLoop.java
Simple IRC Bot
import java.io.*;
import java.net.*;
import java.util.*;
public abstract class IRCMessageLoop implements Runnable {
Socket server;
OutputStream out;
String theChannel;
IRCMessageLoop(String serverName, int port) {
@ridixcr
ridixcr / base64-utf8.module.js
Created March 18, 2018 16:42 — forked from nijikokun/base64-utf8.module.js
Javascript Base64 UTF8 for the Browser / Server. Base64 UTF-8 Encoding and Decoding Libraries / Modules for AMD, CommonJS, Nodejs and Browsers. Cross-browser compatible.
// UTF8 Module
//
// Cleaner and modularized utf-8 encoding and decoding library for javascript.
//
// copyright: MIT
// author: Nijiko Yonskai, @nijikokun, nijikokun@gmail.com
(function (name, definition, context, dependencies) {
if (typeof context['module'] !== 'undefined' && context['module']['exports']) { if (dependencies && context['require']) { for (var i = 0; i < dependencies.length; i++) context[dependencies[i]] = context['require'](dependencies[i]); } context['module']['exports'] = definition.apply(context); }
else if (typeof context['define'] !== 'undefined' && context['define'] === 'function' && context['define']['amd']) { define(name, (dependencies || []), definition); }
else { context[name] = definition.apply(context); }
@ridixcr
ridixcr / CONCURRENCY.md
Created March 16, 2018 10:35 — forked from montanaflynn/CONCURRENCY.md
Examples of sequential, concurrent and parallel requests in node.js

Concurrency in JavaScript

Javascript is a programming language with a peculiar twist. Its event driven model means that nothing blocks and everything runs concurrently. This is not to be confused with the same type of concurrency as running in parallel on multiple cores. Javascript is single threaded so each program runs on a single core yet every line of code executes without waiting for anything to return. This sounds weird but it's true. If you want to have any type of sequential ordering you can use events, callbacks, or as of late promises.

@ridixcr
ridixcr / irc_games.md
Created January 24, 2018 18:53 — forked from myano/irc_games.md
This is a list of games that are playable on IRC.

List of on-IRC games

AlphaChat

  • #multirpg

BakaShiMoe

@ridixcr
ridixcr / emoji.md
Created December 31, 2017 03:22 — forked from razzul/emoji.md
emoji

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: