Skip to content

Instantly share code, notes, and snippets.

View basedalexander's full-sized avatar
🎯
Focusing

Alex Based basedalexander

🎯
Focusing
View GitHub Profile
anonymous
anonymous / config.json
Created April 2, 2016 10:29
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@caweidmann
caweidmann / .eslintrc
Last active May 31, 2016 05:21
The "C-Dawg linter". A comprehensive eslintrc file that implements best practices and strict coding standards.
{
"env": {
"browser": true,
},
"globals": {
"jQuery": false,
"$": false,
"_": false
},
"rules": {
@caweidmann
caweidmann / eslintrc.js
Last active January 26, 2024 20:19
The "C-Dawg linter" annotation.
/*
**
** kyco.eslintrc
** =============
**
** Based on http://eslint.org/docs/rules/
**
** All rules specified in this file are taken from the URL above. We have
** included every single rule except for rules posted under the "Removed"
** section.

Если бы я строил полную учебную программу по computer science, то мат основа там была бы примерно такая:

  1. Логика и дискретная математика. Тут же основы теории множеств и теории чисел. Эти штуки можно изучать в изоляции от всего остального, многим даже далеким от математики эти темы нравятся (особенно теория чисел), и эта среда хорошо подходит для привыкания к мат. доказательствам, индукции и пр.

  2. Мат анализ. Не критично, но как минимум для тренировки мозга очень важный курс, можно экспрессом.

  3. Линейная алгебра. Сильно зависит от будущих целей. Если интересна графика, игры, виртуальная реальность — то линейная алгебра обязательна. Но если нет — то как минимум экспрессом один курс желателен. Отлично вправляет мозги, развивает абстрактное мышление, очень важное в программировании в целом. Представлять себе многомерные структуры и их взаимосвязь — это очень круто. Главное в линейке не попасться в ту же ловушку, в которую попадаются при изучении мат. анализа: в этих штуках можно запомнить механически прав

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active October 29, 2024 08:04
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@webinista
webinista / RunAProxyOnAmazonEC2VPC.md
Last active August 18, 2024 18:20
Create a proxy server on an Amazon EC2 (VPC) instance

This will create a proxy server in whatever your availability zone your VPC is in. For me, that's us-east-1b. For you, that may be something different. Steps 10+ should more or less work regardless of your provider since those steps cover the setup and configuration of TinyProxy.

  1. Click the Launch Instance button.
  2. Choose Ubuntu Server 14.04 LTS (HVM), SSD Volume Type. This isn't strictly necessary. If you choose another OS, check its documentation for how to install new packages.
  3. On the Choose an Instance Type screen, select t2.micro. It's Free Tier eligible.
  4. Click the Next: ... buttons until you reach the Configure Security Group screen.
    • You may wish to reduce the amount of storage on the Add Storage screen. This is optional.
    • You may wish to add a tag on the Tag Instance screen. This is also optional.
  5. On the Configure Security Group screen:
  • Select Create a new security group.
@binarymax
binarymax / Bitmap.js
Last active October 24, 2023 11:08
Javascript bitmap data structure
//------------------------------------------
//Compact bitmap datastructure
//Memory efficient array of bool flags
var Bitmap = function(size){
this._cols = 8;
this._shift = 3;
this._rows = (size>>this._shift)+1;
this._buf = new ArrayBuffer(this._rows);
this._bin = new Uint8Array(this._buf);
};
@davidfraser
davidfraser / uninstall-evernote-cleanup
Created December 29, 2014 09:26
Script to cleanup an Evernote installation under Wine, in order to allow reinstallation - see http://www.sgvulcan.com/evernote-under-wine-already-installed-by-another-user/
#!/bin/bash
echo first uninstall evernote using the wine uninstaller
wine uninstaller
echo now searching forregistry entry to remove
cd ~/.wine/drive_c/windows/profiles/$USER/temp
upgrade_code="`grep 'with upgrade code' EvernoteSetup.log | tail -n 1 | sed 's/^.*with upgrade code {\([A-Fa-f0-9-]*\).*$/\1/'`"
reverse_upgrade_code="`python -c "x='${upgrade_code}' ; y = x[:18].split('-') ; x = x.replace('-', '') ; z = [a+b for a, b in zip(x[16::2], x[17::2])] ; print ''.join(''.join(reversed(part)) for part in y+z).upper()"`"
echo please use regedit to navigate to '\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\' and remove the key "$reverse_upgrade_code"
wine regedit
@apollolm
apollolm / nginx-ssl-config
Last active January 12, 2023 14:47
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}