Skip to content

Instantly share code, notes, and snippets.

View halexandra's full-sized avatar

Alexandra Hegyi halexandra

  • Soft Flow Ltd.
  • Hungary
View GitHub Profile
@halexandra
halexandra / example.xml
Last active May 28, 2020 13:05
example xml
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="N9|)Rbor(i~^H3INa%x/">hum</variable>
</variables>
<block type="variables_set" id="]iW)utVB/`X$;q`9*j.5" x="5" y="135">
<field name="VAR" id="N9|)Rbor(i~^H3INa%x/">hum</field>
<value name="VALUE">
<block type="ble" id="0M#^PX=PnW5D^?Xq/z1v">
<field name="GATT_TYPE">600</field>
</block>
@halexandra
halexandra / css_colors.js
Created July 4, 2019 06:42 — forked from bobspace/css_colors.js
All of the CSS Color names as an array in javascript.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript array containing all of the color names listed in the CSS Spec.
// The full list can be found here: http://www.w3schools.com/cssref/css_colornames.asp
// Use it as you please, 'cuz you can't, like, own a color, man.
var CSS_COLOR_NAMES = ["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","Darkorange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory"
@halexandra
halexandra / colors-array.js
Created July 4, 2019 06:38 — forked from rhernandog/colors-array.js
Array of web safe colors by HEX code
const colors = [
"#F0F8FF",
"#FAEBD7",
"#00FFFF",
"#7FFFD4",
"#F0FFFF",
"#F5F5DC",
"#FFE4C4",
"#000000",
"#FFEBCD",
@halexandra
halexandra / README.md
Last active September 27, 2018 11:07 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@halexandra
halexandra / rsvp.js
Created October 3, 2017 08:48
RSVP example
var getUsers = function(url) {
var promise = new RSVP.Promise(function(resolve, reject){
var client = new XMLHttpRequest();
client.open("GET", url);
client.onreadystatechange = handler;
client.responseType = "json";
client.setRequestHeader("Accept", "application/json");
client.send();
function handler() {
@halexandra
halexandra / chat.service.js
Created January 25, 2017 12:15
Chat service skeleton
(function () {
'use strict';
angular
.module('crosssec')
.factory('ChatService', ChatService);
/** @ngInject */
function ChatService($websocket, $log, $localStorage, UtilService, $q, $rootScope) {
var service = {};
@halexandra
halexandra / crosssec_chat_ws.md
Last active January 25, 2017 09:54
Crosssec Chat WebSocket

Nem vagyok 100%-ig biztos benne, hogy mit hogyan kellene megoldani, de ilyesmikre gondoltam:

  • Pár testuser legyen eltárolva, hogy szimulálni tudjunk egy üzenetküldést (csak hogy az "echo üzenet" ne magamtól érkezzen).
  • A userek online státuszának meghatározásához (online, elfoglalt, offline) kellene egy connect és egy disconnect event, vagy valami hasonló.

Jelenleg így küldök el egy üzenetet:

{
  channelId: "1234-5678-9012",
 content: "This is the message",
@halexandra
halexandra / routed.tabs.directive.js
Last active January 12, 2017 09:37
directive example
(function () {
'use strict';
angular
.module('crosssec')
.directive('routedTabs', routedTabs);
/** @ngInject */
function routedTabs() {
var directive = {
@halexandra
halexandra / compact_remove_hotfix
Last active August 29, 2015 14:20
compass-mixins LibSass problem hotfix
//from here: https://github.com/Igosuki/compass-mixins/issues/34
@function compact($var-1, $var-2: false,
$var-3: false, $var-4: false,
$var-5: false, $var-6: false,
$var-7: false, $var-8: false,
$var-9: false, $var-10: false) {
$full: $var-1;
$vars: $var-2, $var-3, $var-4, $var-5,
$var-6, $var-7, $var-8, $var-9, $var-10;
@halexandra
halexandra / linux_removeppa_uninstall
Created April 21, 2015 09:37
Linux - Remove PPA and uninstall
Use the --remove flag, similar to how the PPA was added:
sudo add-apt-repository --remove ppa:whatever/ppa
As a safer alternative, you can install ppa-purge:
sudo apt-get install ppa-purge
And then remove the PPA, downgrading gracefully packages it provided to packages provided by official repositories:
sudo ppa-purge ppa_name
Anyway, this won't uninstall packages that were on the PPA but not on tha official repositories. If you want to remove them, you should tell it to apt: