Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Why is GitHub supporting a child separation agency?

yonatan miller shushugah

💭
Why is GitHub supporting a child separation agency?
View GitHub Profile
@shushugah
shushugah / TechWorkersBerlin_Agenda.md
Last active Jun 24, 2019
Agenda for first Tech Workers Coalition Berlin meeting
View TechWorkersBerlin_Agenda.md

Tech Workers Coalition

Tech Workers Coalition Berlin

Tech Workers have a lot of potential power to change society. Anyone who identifies as a tech worker and is interested in learning how to build collective power or get involved in a campaign is welcome. Tech Workers are currently organising against gender pay gaps, workplace harassment, surveillance technologies, amongst other things. This document is an agenda item for the first meeting of Tech Workers Coalition Berlin.

A panel about Tech Workers Movement was held earlier this month 10 June 2019 at Aquarium Am Südblock, featuring Logic Magazine co-founders Ben Tarnoff and Moira Weigel. Ben, who is also an organiser of the Boston chapter, will be present during the meeting. You can click to watch the video or listen for audio.

2

@shushugah
shushugah / git
Created Sep 27, 2017
Useful git commands
View git
`git log -- file_path_name --follow` // will show all relevant commits for renamed/deleted files
@shushugah
shushugah / InitialReactionsToReactWrittenInReact.js
Last active Sep 22, 2017
Initial Reactions ToReact Written in React
View InitialReactionsToReactWrittenInReact.js
import React from 'react';
import ReactDom from 'react-dom';
class FirstImpressions extends React.Component {
const impressionComponents = this._getImpressions();
render() {
return(
<div>
<h1>I am JSX</h1>
<p className="a_css_class_name">
@shushugah
shushugah / rails-autoloading.md
Last active Oct 6, 2017
Rails Autoloading Behavior and Module name spacing
View rails-autoloading.md
# app/models/campaign.rb 
class Campaign; end # This class is completely irrelevent to our code, but has same class name as the other campaign class.

# app/resources/homepage/apple.rb
module Resources
  module Homepage
    class Apple < Campaign
      campaign_method!  # This fails because apple.rb is loaded alphabetically before resources/homepage/campaign.rb 
    end
View Josh.js
var submit = $("button");
var inputField = $("input");
var menuType = $("select");
var listContainer = $("#listContainer");
var selectType;
var results;
submit.on('click', function(){
var artistName = inputField.val();
selectType = menuType.val();
View events.go
// Copygright 2016 Google Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to writing, software distributed
// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied.
//
View gist:7619a473fcfd9992fdab
#2 models
class EarlyVoteSite < ActiveRecord::Base
has_and_belongs_to_many :locality,
:foreign_key => 'locality_id', :primary_key => 'p_id'
end
class Locality < ActiveRecord::Base
has_and_belongs_to_many :early_vote_sites,
View gist:100fd0a1989a42155bc9
class Alert < ActiveRecord::Base
belongs_to :recipient
has_many :services
#make variable/method Service.find_by(name: self.service_name).traffic
def bad_service?
Service.find_by(name: self.service_name).traffic =! "GOOD SERVICE"
end
def self.current_train_status
View gist:f99c7bec4368012b4292
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rarequire File.expand_path('../config/application', __FILE__)
require File.expand_path('../config/application', __FILE__)
Rails.application.load_tasks
task :text_each_alert => :environment do
Alert.all.each do |alert|
View gist:a198fcc259cdf5679ebc
Rails.application.routes.draw do
resources :contacts
resources :recipients