Skip to content

Instantly share code, notes, and snippets.

nasitra

Block or report user

Report or block nasitra

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
@nasitra
nasitra / flatland.gcetheme
Last active Dec 14, 2018
Color scheme settings of Flatland theme for GoCoEdit
View flatland.gcetheme
{
"name": "flatland",
"defaults": {
"text_color":"f8f8f8",
"background":"26292c",
"activeline_background":"202325",
"matchingbracket_color":"bbbcbd"
},
"gutters": {
"background":"26292c",
@nasitra
nasitra / settings.json
Last active Dec 14, 2018
Custom color scheme settings to Flatland theme for Visual Studio Code
View settings.json
{
"editor.tokenColorCustomizations": {
"[Flatland_Dark]": {
"comments": "#798188",
"functions": "#F8F8F8",
"keywords": "#FA9A4B",
"numbers": "#B8D977",
"strings": "#C4E2F2",
"types": "#F8F8F8",
"variables": "#F8F8F8",
@nasitra
nasitra / index.html
Created Nov 14, 2017
Responsively change div size keeping aspect ratio
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body {
margin: 0;
}
@nasitra
nasitra / index.html
Created Aug 14, 2017
Scrollable fixed content
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body {
height: 2000px;
margin: 0;
}
@nasitra
nasitra / repl.go
Created Jul 14, 2017
Golang repl template
View repl.go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
fmt.Print("> ")
@nasitra
nasitra / backtrace.c
Created Oct 9, 2016
Print call stack by using libunwind
View backtrace.c
#include <libunwind.h>
#include <libunwind-ptrace.h>
#include "backtrace.h"
#define MAX_BACKTRACE_FRAMES 64
void unwind(pid_t pid) {
unw_addr_space_t addr_space = NULL;
struct UPT_info* upt_info = NULL;
@nasitra
nasitra / websocket-client.cpp
Created Sep 21, 2016
WebSocket client implemented with C++
View websocket-client.cpp
#include "websocket-client.h"
#include <iostream>
using websocketpp::lib::placeholders::_1;
using websocketpp::lib::placeholders::_2;
using websocketpp::lib::bind;
WebSocketClient::WebSocketClient(std::string uri) {
mUri = uri;
@nasitra
nasitra / save_canvas.js
Created Aug 21, 2016
Save canvas as an image file
View save_canvas.js
var canvas = document.getElementById('canvas');
var image = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream');
window.location.href = image;
@nasitra
nasitra / image.svg
Created May 23, 2016
Access JavaScript function in SVG
View image.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nasitra
nasitra / Flatland Dark.tmTheme
Last active Jun 28, 2016
Insert color scheme settings to Flatland theme for Sublime Text 3 (build 3103)
View Flatland Dark.tmTheme
...
<dict>
<key>name</key>
<string>Entity.name.label</string>
<key>scope</key>
<string>entity.name.label</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#F8F8F8</string>
You can’t perform that action at this time.