Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
@mixin wonderful-buttons($prop) {
&.vk {
#{$prop}: rgb(69,104,142);
}
&.youtube {
#{$prop}: rgb(255,0,0);
}
}
module Huffman where
import Data.Array
import Data.Char
import Data.List
a ~> b = b a
data Huffman_Tree =
HLeaf Int Char
import random
def generatePassword(length):
def bigSample(orig, ln):
ls = []
while ln - len(ls) > len(orig):
ls = ls + orig
random.shuffle(ls)
return ls + random.sample(orig, ln - len(ls))
vowels = bigSample(list("aeuio"), length // 2 + 1)
import java.util.*;
class Primes {
public static void main(String args[]) {
int n = 100000, status = 1, num = 3;
if (n >= 1) {
System.out.println("First "+n+" prime numbers are :-");
System.out.println(2);
}
# Conky settings
background yes
update_interval 1
double_buffer yes
#no_buffers yes
# Window specifications
gap_x 20
module.exports = function (grunt) {
'use strict';
// Project configuration
grunt.initConfig({
rasterize: {
front: {
vector: 'src/front.svg',
raster: [{ path: 'preview/front.png' }]
},
inside: {
@notpushkin
notpushkin / Birman.json.js
Last active August 29, 2015 13:57
Various useful keybindings for ST3
[
/**
* Based on <http://ilyabirman.ru/projects/typography-layout/>
*/
// «french»
{ "keys": ["alt+,"], "command": "insert_snippet", "args": {"contents": "«$0»"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
@notpushkin
notpushkin / justplay.sh
Created March 31, 2014 20:09
The thing I use to listen to music now
#!/bin/bash
MP3DIR="$HOME/music/"
PLAYLIST_FILE="${mktemp}"
find $MP3DIR -name "*.mp3" -print | shuf > "$PLAYLIST_FILE"
exec < "$PLAYLIST_FILE"
while read file
// ==UserScript==
// @name window test script
// @namespace ale+windowtest@incrowd.ws
// @include http://jsfiddle.net/*
// @include https://jsfiddle.net/*
// @include http://fiddle.jshell.net/*
// @include https://fiddle.jshell.net/*
// @version 1
// @grant none
// ==/UserScript==
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("wikipedia.org") {
html, body {
font-family: serif;
}
#content p {
font-size: 0.9em;
}